fasta.py 文件源码

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

项目:cellranger 作者: 10XGenomics 项目源码 文件源码
def __init__(self, fullpath):
        fn = os.path.split(fullpath)[-1]

        dot_parts = fn.split(".")
        if dot_parts[-1] == "fastq":
            name = dot_parts[-2]
        elif len(dot_parts) > 2 and dot_parts[-2] == "fastq":
            name = dot_parts[-3]
        else:
            raise NameError("%s is not a fastq file" % fullpath)

        all_flds = name.split("_")

        flds = all_flds[-4:]
        self.prefix = "_".join(all_flds[:-4])

        self.s = flds[0][1:]
        self.lane = int(flds[1][2:])
        self.read = flds[2]
        self.group = int(flds[3])

        self.filename = fullpath
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号