Example #1
0
 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()))
Example #2
0
 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()))
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #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
Example #12
0
 def _from_java(jtbm):
     return tblockmatrix(dtype(jtbm.elementType().toString()),
                         jiterable_to_list(jtbm.shape()), jtbm.blockSize(),
                         jiterable_to_list(jtbm.dimsPartitioned()))
Example #13
0
 def _from_java(jtbm):
     return tblockmatrix(dtype(jtbm.elementType().toString()),
                         jiterable_to_list(jtbm.shape()),
                         jtbm.isRowVector(), jtbm.blockSize())
Example #14
0
 def _from_java(jtt):
     return ttable(
         dtype(jtt.globalType().toString()),
         dtype(jtt.rowType().toString()),
         jiterable_to_list(jtt.key()))
Example #15
0
 def _from_java(jtbm):
     return tblockmatrix(
         dtype(jtbm.elementType().toString()),
         jiterable_to_list(jtbm.shape()),
         jtbm.isRowVector(),
         jtbm.blockSize())
Example #16
0
 def _from_java(jtbm):
     return tblockmatrix(jiterable_to_list(jtbm.shape()), jtbm.blockSize(),
                         jiterable_to_list(jtbm.dimsPartitioned()))