def _read_reference(self, reference):
"""Read in the reference from the file into a dictionary.
Parameters
----------
reference: str
Path to the reference.
Returns
-------
reference: dict
Dictionary with chromosome - sequence mapping.
"""
if reference is None:
self._reference = None
else:
self._reference = {}
with open(reference) as reference_fp:
for record in SeqIO.parse(reference_fp, "fasta"):
self._reference[record.id] = list(record.seq)
评论列表
文章目录