simulate_copy_number_changes.py 文件源码

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

项目:tHapMix 作者: Illumina 项目源码 文件源码
def pileup(bamfile_name):
   samfile = pysam.Samfile(bamfile_name,"rb")
   output_pileup = open("test.cov", "w")
   sum_cov=0
   for pos_pileup in samfile.pileup():
       sum_cov+=pos_pileup.n
       if not pos_pileup.pos % 1e3:
          av_cov=int(sum_cov/1e3)
          sum_cov=0
          print(pos_pileup.tid,pos_pileup.pos,av_cov,file=output_pileup)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号