I have a sorted bedfile comprised of three columns: seqid, start, and end.
sort -k1,1 -k2,2n tmp2.bed > tmp3.bed
1 6589256 6589207
1 11627195 12127194
1 12616616 12116617
1 18283067 18273068
1 21826932 21926931
1 28787213 28788212
1 31195434 31195483
1 39374350 39364351
1 42307024 42357023
1 47379997 47374998
~/tools/bedtools2/bin/bedtools merge -i tmp3.bed
Error: unable to open file or unable to determine types for file tmp3.bed
Probably something silly, but I'm not seeing it.
EDIT:
The second column - start must be before the end coordinates. It would be nice if bedtools threw an informative error as the user sucks.
bedtools do throw such error messages:
I got this message using your example (bedtools v2.19.1).
That is weird because my version is above your version number and I didn't get that error.
bedtools v2.21.0-2-g6a92b11
What version of bedtools? Are you sure it is tab-delimited (check with
cat -t
)?