def chromosome_lengths(self):
"""
Returns
-------
tuple
Chromosome lengths ordered by sequence order in fasta
"""
fastafile = pysam.FastaFile(self.filepath)
lengths = fastafile.lengths
fastafile.close()
# pysam's .lengths does not return a tuple (despite what is in the docs),
# so, convert to tuple before returning.
return tuple(lengths)
评论列表
文章目录