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?