pacbio.py 文件源码

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

项目:sequana 作者: sequana 项目源码 文件源码
def filter_bool(self, output_filename, mask):
        """Select and Write reads using a mask

        :param str output_filename: name of output file
        :param list list_bool: True to write read to output, False to ignore it

        """
        assert output_filename != self.filename, \
            "output filename should be different from the input filename"
        assert len(mask) == self._N, \
            "list of bool must be the same size as BAM file"
        self.reset()
        with pysam.AlignmentFile(output_filename,  "wb", template=self.data) as fh:
            for read, keep in zip(self.data, mask):
                if keep:
                    fh.write(read)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号