예제 #1
0
파일: matrix_type.py 프로젝트: saponas/hail
 def _from_java(jtt):
     return tmatrix(dtype(jtt.globalType().toString()),
                    dtype(jtt.colType().toString()),
                    jiterable_to_list(jtt.colKey()),
                    dtype(jtt.rowType().toString()),
                    jiterable_to_list(jtt.rowKey()),
                    dtype(jtt.entryType().toString()))
예제 #2
0
파일: matrix_type.py 프로젝트: bcajes/hail
 def _from_java(jtt):
     return tmatrix(
         dtype(jtt.globalType().toString()),
         dtype(jtt.colType().toString()),
         jiterable_to_list(jtt.colKey()),
         dtype(jtt.rowType().toString()),
         jiterable_to_list(jtt.rowKey()),
         dtype(jtt.entryType().toString()))
예제 #3
0
    def mt_contigs(self):
        """Mitochondrial contigs.

        :rtype: list of str
        """
        if self._mt_contigs is None:
            self._mt_contigs = [
                str(x) for x in jiterable_to_list(self._jrep.mtContigs())
            ]
        return self._mt_contigs
예제 #4
0
    def y_contigs(self):
        """Y contigs.

        :rtype: list of str
        """
        if self._y_contigs is None:
            self._y_contigs = [
                str(x) for x in jiterable_to_list(self._jrep.yContigs())
            ]
        return self._y_contigs
예제 #5
0
    def mt_contigs(self):
        """Mitochondrial contigs.

        Returns
        -------
        :obj:`list` of :obj:`str`
        """
        if self._mt_contigs is None:
            self._mt_contigs = [str(x) for x in jiterable_to_list(self._jrep.mtContigs())]
        return self._mt_contigs
예제 #6
0
    def lengths(self):
        """Dict of contig name to contig length.

        Returns
        -------
        :obj:`list` of :obj:`str`
        """
        if self._lengths is None:
            self._lengths = {str(x._1()): int(x._2()) for x in jiterable_to_list(self._jrep.lengths())}
        return self._lengths
예제 #7
0
    def y_contigs(self):
        """Y contigs.

        Returns
        -------
        :obj:`list` of :obj:`str`
        """
        if self._y_contigs is None:
            self._y_contigs = [str(x) for x in jiterable_to_list(self._jrep.yContigs())]
        return self._y_contigs
예제 #8
0
    def mt_contigs(self):
        """Mitochondrial contigs.

        Returns
        -------
        :obj:`list` of :obj:`str`
        """
        if self._mt_contigs is None:
            self._mt_contigs = [str(x) for x in jiterable_to_list(self._jrep.mtContigs())]
        return self._mt_contigs
예제 #9
0
    def y_contigs(self):
        """Y contigs.

        Returns
        -------
        :obj:`list` of :obj:`str`
        """
        if self._y_contigs is None:
            self._y_contigs = [str(x) for x in jiterable_to_list(self._jrep.yContigs())]
        return self._y_contigs
예제 #10
0
    def lengths(self):
        """Dict of contig name to contig length.

        Returns
        -------
        :obj:`list` of :obj:`str`
        """
        if self._lengths is None:
            self._lengths = {str(x._1()): int(x._2()) for x in jiterable_to_list(self._jrep.lengths())}
        return self._lengths
예제 #11
0
    def lengths(self):
        """Dict of contig name to contig length.

        :rtype: dict of str to int
        """
        if self._lengths is None:
            self._lengths = {
                str(x._1()): int(x._2())
                for x in jiterable_to_list(self._jrep.lengths())
            }
        return self._lengths
예제 #12
0
 def _from_java(jtbm):
     return tblockmatrix(dtype(jtbm.elementType().toString()),
                         jiterable_to_list(jtbm.shape()), jtbm.blockSize(),
                         jiterable_to_list(jtbm.dimsPartitioned()))
예제 #13
0
 def _from_java(jtbm):
     return tblockmatrix(dtype(jtbm.elementType().toString()),
                         jiterable_to_list(jtbm.shape()),
                         jtbm.isRowVector(), jtbm.blockSize())
예제 #14
0
 def _from_java(jtt):
     return ttable(
         dtype(jtt.globalType().toString()),
         dtype(jtt.rowType().toString()),
         jiterable_to_list(jtt.key()))
예제 #15
0
 def _from_java(jtbm):
     return tblockmatrix(
         dtype(jtbm.elementType().toString()),
         jiterable_to_list(jtbm.shape()),
         jtbm.isRowVector(),
         jtbm.blockSize())
예제 #16
0
 def _from_java(jtbm):
     return tblockmatrix(jiterable_to_list(jtbm.shape()), jtbm.blockSize(),
                         jiterable_to_list(jtbm.dimsPartitioned()))