reference.py 文件源码

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

项目:cellranger 作者: 10XGenomics 项目源码 文件源码
def build_gtf(self):
        print "Writing new genes GTF file (may take 10 minutes for a 1GB input GTF file)..."
        with open(self.out_gtf_fn, 'wb') as f:
            writer = csv.writer(f, delimiter='\t', quoting=csv.QUOTE_NONE, quotechar='')
            for row, is_comment, properties in self.gtf_reader_iter(self.in_gtf_fn):
                if is_comment:
                    writer.writerow(row)
                    continue

                remove = False
                for key, value in properties.iteritems():
                    if key in self.attributes and value not in self.attributes[key]:
                        remove = True

                if not remove:
                    writer.writerow(row)

        print "...done\n"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号