Beispiel #1
0
 def _from_java(cls, jrep):
     gr = GenomeReference.__new__(cls)
     gr._init_from_java(jrep)
     gr._name = jrep.name()
     gr._contigs = [str(x) for x in jrep.contigs()]
     gr._lengths = {str(x._1()): int(x._2()) for x in jiterable_to_list(jrep.lengths())}
     gr._x_contigs = [str(x) for x in jiterable_to_list(jrep.xContigs())]
     gr._y_contigs = [str(x) for x in jiterable_to_list(jrep.yContigs())]
     gr._mt_contigs = [str(x) for x in jiterable_to_list(jrep.mtContigs())]
     gr._par = [Interval._from_java(x) for x in jrep.par()]
     return gr
Beispiel #2
0
 def _from_java(cls, jrep):
     gr = GenomeReference.__new__(cls)
     gr._init_from_java(jrep)
     gr._name = jrep.name()
     gr._contigs = [str(x) for x in jrep.contigs()]
     gr._lengths = {
         str(x._1()): int(x._2())
         for x in jiterable_to_list(jrep.lengths())
     }
     gr._x_contigs = [str(x) for x in jiterable_to_list(jrep.xContigs())]
     gr._y_contigs = [str(x) for x in jiterable_to_list(jrep.yContigs())]
     gr._mt_contigs = [str(x) for x in jiterable_to_list(jrep.mtContigs())]
     gr._par = [Interval._from_java(x) for x in jrep.par()]
     return gr
Beispiel #3
0
 def _from_java(cls, jrep):
     summary = Summary.__new__(cls)
     summary.samples = jrep.samples()
     summary.variants = jrep.variants()
     summary.call_rate = jrep.callRate().getOrElse(None)
     summary.contigs = [str(x) for x in jiterable_to_list(jrep.contigs())]
     summary.multiallelics = jrep.multiallelics()
     summary.snps = jrep.snps()
     summary.mnps = jrep.mnps()
     summary.insertions = jrep.insertions()
     summary.deletions = jrep.deletions()
     summary.complex = jrep.complex()
     summary.star = jrep.star()
     summary.max_alleles = jrep.maxAlleles()
     return summary
Beispiel #4
0
 def _from_java(cls, jrep):
     summary = Summary.__new__(cls)
     summary.samples = jrep.samples()
     summary.variants = jrep.variants()
     summary.call_rate = jrep.callRate().get() if jrep.callRate().isDefined() else float('nan')
     summary.contigs = [str(x) for x in jiterable_to_list(jrep.contigs())]
     summary.multiallelics = jrep.multiallelics()
     summary.snps = jrep.snps()
     summary.mnps = jrep.mnps()
     summary.insertions = jrep.insertions()
     summary.deletions = jrep.deletions()
     summary.complex = jrep.complex()
     summary.star = jrep.star()
     summary.max_alleles = jrep.maxAlleles()
     return summary