I am trying to make a histogram of the sequencing depth in a set of BAM files using the WES kit's target_regions.bed file. I ran the following command with no error messages generated:
bedtools coverage -hist -abam sample.bam -b target_regions.bed | grep ^all > sample.bam.hist.all.txt
However, after running this on each of my 35 samples, all of the files show at most 1x coverage (which can be clearly demonstrated as wrong in IGV), like the following:
all 0 1644941785 -277541545 0.4094517 all 1 -1922483330 -277541545 0.5905483
I did ensure the BED file was sorted, though I noticed that the position of chrM is in a different location in my BAM and my BED. Could this cause the issue or is it something more complicated? I've been reading forums all day to no avail, so any suggestions are welcome! Thanks!