Hello,
I am trying to use bedtools subtract in the following way:
$ bedtools subtract -a A.bed -b B.bed
but I get the following error:
ERROR: file A.bed has non positional records, which are only valid for the groupBy tool
When I tried to Google the answer, none of the solutions provided seemed to help. Here is the head of A.bed:
$ head A.bed
chr1 1 249250621
chr2 1 243199373
chr3 1 198022430
chr4 1 191154276
chr5 1 180915260
chr6 1 171115067
chr7 1 159138663
chrX 1 155270560
chr8 1 146364022
chr9 1 141213431
The cross checked that the columns are tab delimited and the three important columns are in the right order. Additionally, there are no invisible characters after the final column that might throw off Bedtools.
Any insight into the problem would be greatly appreciated!
Are the delimiters the same in both files?
I just checked, and they are. But I found out that the end characters for A.bed are windows end characters and B.bed are Linux end characters. After I fixed this issue, the program worked.