Hi all,
I'm trying to intersect a vcf file (as file -a
) with a bed file (as file -b
). I'm getting this error:
ERROR: Received illegal bin number 4294967295 from getBin call.
ERROR: Unable to add record to tree.
After reading some previous similar questions, I made sure that my bed file is tab delimited and sorted.
When using the -sorted
flag I got an error on my first position in the bed file:
Error: Sorted input specified, but the file file.bed has the following out of order record
1 2336225 2337283
Would appreciate any suggestions
Thanks
Hila
adding
My command line is:
bedtools intersect -a file_a.gz -b file_b.bed
I don't have headers in both files
chromosomes on the bed file are: 1, 2, 3 rather than chr1, chr2, chr3?
yes, does it matter? should I change it to chr1, chr2...?
Yes, this does matter!
All your files in your analyse pipeline should have the same naming schema. Otherwise you are running in problems like this one.
fin swimmer
In addition to @finswimmer response, your sorting scheme is 1, 2, 3. If the gz file is chr1, chr2, chr3, it is probably sorted lexicographically (chr1, chr10).
Hello, can you add your command line and the header of each files in your post please.
I've added it to the original post. Thanks!
Do sorting of both the files with sort -V giving appropriate columns (e.g,1-3 in the given file.bed) and then try .
Hello hila ,
how did you made the sorting of both files? Also have a look at the line before and after the one bedtools is complaining about. How does they look like?
fin swimmer
Hi, the sorting was done by
The line bedtools is complaining about is the first line in the bed file, the line after it is in order Thanks Hila
Looks ok. Have you done it for both files?
In your initial post you wrote the filename is
file_a.gz
. How did you compress it? Usingbgzip
would be the right way.fin swimmer
I got the gz file from another source, I didn't make it myself. The thing is- this code already worked with the same gz file and another bed file, so I guess the problem is with the new bed file, I just can't find it :(