Question: Genomecov 0 or 1 based results?
1
gravatar for mathieu.bahin
4.5 years ago by
France
mathieu.bahin50 wrote:

Hi all,

From what I understand BED and BAM format are 0-based (but BED is exclusive on the stop).

I have to process precisely results from 'bedtools genomecov' and I don't agree with the results I found (if the previous statement is correct). To check this I created a 1 line BAM file (with the appropriate header):

read1    0       Chr3    5130    255     51M     *       0       0       ATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATGCATG     CCCFFFFFHHHHHCGIJJJJJJJJJJJJJHIJJJJJJJJJJJJJIJJIJJJ

And I now try that:

bedtools genomecov -bg -split -strand + -ibam read1.bam

And get that:

Chr3    5129    5180    1

From what I understand, I should get:

Chr3    5130    5181    1

because the BAM is supposed to be already 0-based and the stop should be 5181 (5130+51).

Am I wrong somewhere?

Cheers, Mathieu

tool bedtools • 1.2k views
ADD COMMENTlink modified 4.5 years ago by Istvan Albert ♦♦ 84k • written 4.5 years ago by mathieu.bahin50
1
gravatar for mathieu.bahin
4.5 years ago by
France
mathieu.bahin50 wrote:

Ok sorry, I think I understood why. I'm looking at the BAM file but in the SAM format which 1-based.

ADD COMMENTlink written 4.5 years ago by mathieu.bahin50

Yes this can be very confusing, the 0 based BAM applies only internally when you look at it with samtools it has already been converted. Thanks for following up with an answer.

ADD REPLYlink written 4.5 years ago by Istvan Albert ♦♦ 84k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2043 users visited in the last hour