This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to calculate coverage in bam file over a specific bed file

Hi every body, I have bam files (in different conditions) and a bed file with specific genes of interest. I would like to calculate the coverage for each bam file over my gene list. What I am doing is, for each condition:

bedtools multicov -bams *cond1.bam -bed exon.bed > multicov_condition1_exon
bedtools multicov -bams *cond2.bam -bed exon.bed > multicov_condition2_exon
bedtools multicov -bams *cond3.bam -bed exon.bed > multicov_condition3_exon

The final idea is to identified in which condition the coverage is higher. Is that a good option to analyze my data?

Thanks!

rna-seq exon coverage multicov bedtools

1 answer

From deepTools: multiBamSummary BED-file --bamfiles *.bam --BED exon.bed -o multicov.npz. The result in a compressed numpy matrix that you can load with numpy.load in python.

Log in to answer this question.