以前是没有想过用这个软件的,直到有一个我的htseq无法对比对的bam文件进行基因计数(后来我才发现htseq无法计数的原因是gtf版本不同导致坐标不同,而且gtf对染色体编号没有加上chr),我简单搜索了一下,发现bedtools multicov也有类似的功能,所以我选择它来试试看!
首先注意它需要sort的bam文件及bam的index
bedtools multicov depends upon index BAM files in order to count the number of overlaps in each BAM file. As such, each BAM file should be position sorted (samtool sort aln.bam aln.sort) and indexed (samtools index aln.sort.bam) with either samtools or bamtools.
首先安装它:
解压开后
Make clean
Make all
然后就可以看到它的bin目录下全部是程序啦
命令很简单的
bedtools multicov[OPTIONS] -bams BAM1 BAM2 BAM3 ... BAMn -bed
By default, multicov will report the count of alignments in each input BAM file that overlap.
例子:
bedtools multicov -bams aln1.bam aln2.bam aln3.bam -bed ivls-of-interest.bed
ivls-of-in