Hello,
I am following this tutorial in order to plot che coverage depth for my target exomes: Visualize coverage for targeted NGS (exome) experiments. I also want to produce a plot similar to the post.
So I am using the following command line for all my bam files:
bedtools coverage -hist -abam {} -b input.bed | grep ^all > {}.hist.all.txt
I get an output where depth of coverage is either 0
or 1
. But in the plot from the post the values are from 0 to 400. If i change bam files as -b and bed file as -a the output is empty. Why is that and what am I doing wrong?
all 0 697333613 802606707 0.5315176
all 1 105273094 802606707 0.4684824
Could you show us the plot ? How to add an image on Biostars.
Hi,
I am experiencing exactly the same issue. Were you able to solve it?
Thanks in advance. Victor
I don't entirely know if this is the issue, but the post that you linked was made in 2014 and I can confidently say that bedtools has updated their scripts since then. When I look at the documentation for the latest version of bedtools (v 2.30.0) I don't see
-hist
as a parameter forbedtools genomecov
, but there may be backward compatibility...What version of bedtools are you using? What happens if you upgrade and revise your code to use this latest version?
Actually, the tool is
bedtools coverage
and notgenomecov
, and-hist
is still an option. From v 2.24, bam file is included as-b
and bed file as-a
, as User000 mentioned. I have used v2.29 and 2.30, but the problem is the same for both (at least in my case).Hi, I did solve this, but I do not remember, almost 2 years ago. I sued this version of bedtools if you want to give it a try: bedtools2-2.19.0