Hi, I have a list of regions in a BED file and I want to know the average depth of each region as calculated from a BAM file, ideally as the fourth column in the output file (like an extra column in the BED file). Is there some combination of Samtools/Bedtools and awk that I can use to get this? Thanks!
Thanks for the reply, RamRS! Running into installation issues with mosdepth. Any way either samtools or bedtools can do this for me?
Yeah samtools should be able to do this, but trust me - mosdepth is far quicker. What problems are you running into? If you have access to
conda
, you should justThanks, RamRS. I was able to install it using docker but ran into error:
I also installed the latest htslib from http://www.htslib.org/download/
Any idea how I can fix this? Thanks so much for your help.
Sorry, I don't know Docker, so I can't say if that error is Docker based or mosdepth based. I recognize the HTSLIB error though. What is the output of