This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Using Bedtools coverage to find BAM coverage?

Hello,

I am trying to use bedtools coverage to compute the depth at particular SNP sites that I list in a BED file. I am running this command:

bedtools coverage -a sample.bed -b sample.bam -mean > test

However, the output seems to list that the average coverage per site in the BED file is 0. I don't think this is true because I also ran GATK's DepthofCoverage, and it differs dramatically from what bedtools shows. Am I using bedtools incorrectly?

bedtools

1 answer

You may want to switch the BAM to be 'a' and use -abam, and also add the -d command line parameter. Please take a look through the documentation: https://bedtools.readthedocs.io/en/latest/content/tools/coverage.html

Also check that your contig names are the same in both 'a' and 'b'.

Kevin

Log in to answer this question.