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"
评论列表
文章目录