def read_tabix(fp, chrom=None, start=None, end=None):
with closing(pysam.TabixFile(fp)) as f:
names = list(f.header) or None
df = pd.read_csv(
io.StringIO('\n'.join(f.fetch(chrom, start, end))),
sep='\t', header=None, names=names)
return df
评论列表
文章目录