Hey,
I'm working with bedtools trying to find out the coverage of several target regions. I have my bam files and my target regions in a .bed file and I'm running this:
bedtools bamtobed -i WA01.bam | bedtools coverage -a - -b mit.bed > exons.mit.coverage
When I open the exons.mit.coverage file, in the coverage section I just have 0s in the areas that are not matching my target genes and 1s in the areas of my target genes, as I have coverage per read.
My question: How can I obtain coverage per gene and not coverage per read?
I imagine I can filter this out, selecting the reads with a good quality score per gene, but I think this should be already implemented anywhere else that I don't know
Thanks for your help! :)
see How to calculate average coverage for all genes
I'm also going to check that link, thanks!