def indexFile(options):
filename=options.output
if not options.ensembl is None:
sys.stdout.write('Compressing output file... ')
sys.stdout.flush()
pysam.tabix_compress(filename,filename+'.gz',force=True)
sys.stdout.write('OK\n')
sys.stdout.write('Indexing output file... ')
sys.stdout.flush()
pysam.tabix_index(filename+'.gz', seq_col=2, start_col=4, end_col=5, meta_char='#',force=True)
sys.stdout.write('OK\n')
else:
print 'Compressing file...'
pysam.tabix_compress(filename,filename+'.gz',force=True)
print 'Indexing file...'
pysam.tabix_index(filename+'.gz', seq_col=1, start_col=2, end_col=2, meta_char='#',force=True)
# Sort records in file
评论列表
文章目录