bedtools2
bedtools2 copied to clipboard
Sorted input has out of order record
I have an issue when I try to intersect two sorted bed files with bedtools v2.29.2
$ cat test_a.bed
Y 9429489 9429490
Y 13139020 13139020
Y 13142410 13142411
Y 13142410 13142413
$ cat test_b.bed
1 645710 645711 ALU 0.00698882 0.0189
$ bedtools intersect -sorted -a test_a.bed -b test_b.bed
Error: Sorted input specified, but the file test_a.bed has the following out of order record
Y 13142410 13142413
I read similar threads reporting issues with "0 length" variants and incorrect sorted bed files. But both files are sorted. When I delete any of the variants of test_a.bed it works again.