__init__.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:PHEnix 作者: phe-bioinformatics 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号