arq5x / bedtools

A powerful toolset for genome arithmetic.
http://code.google.com/p/bedtools/
GNU General Public License v2.0
139 stars 86 forks source link

Issue in merge (0-based or 1-based) [v2.28.0] #149

Closed daramism closed 5 years ago

daramism commented 5 years ago
$ cat A.bed 
chr1    60  61
chr1    60  80
chr1    600 600
chr1    600 800

bedtools merge -i A.bed 
chr1    60  80
chr1    599 800

If start and end position are same (600), bedtools merge automatically treat this as 0-based interval and output it as 599. Is it an expected output? I would expect chr1 600 800 instead of chr1 599 800. Thank you.

daramism commented 5 years ago

I think I should make the A.bed as 0-based before running bedtools merge.