Question: Bedtools Invalid record, record does not exist
gravatar for menzel
6 months ago by
menzel0 wrote:

Good morning,

I have found an error using bedtools and now I am trying to make sense of it: Using some scripts I wrote I created a .bed-file, but now when I try to use this file with bedtools it shows me the error:

Error: Invalid record in file genes.bed. Record is chr1 214785930 -2147107995

However, there is no line with this start and end position, and there is no minus sign in the whole file.

I tried it with differen systems, locally I am using bedtools v2.25.0

I uploaded a part of my .bed-file as a gist:

Maybe you can check if you see the same error, right now I tend to think there is some issue with this version of bedtools. The error occurs with merge and intersect, so you can try:

bedtools merge -i genes.bed
bedtools bed • 328 views
ADD COMMENTlink modified 6 months ago by Pierre Lindenbaum110k • written 6 months ago by menzel0
gravatar for Pierre Lindenbaum
6 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum110k wrote:

the bad record is

$ wget -q -O - "" | grep 21478593 
chr1    214785930       2147859301

2147859301 ? not 214785931 ?

anyway 2147859301 is greater than C-INT_MAX : 2147483647 so any operation on this kind of number might lead to strange results. see


this operation invokes undefined behavior. Signed integer overflow is undefined behavior in C.

ADD COMMENTlink modified 6 months ago • written 6 months ago by Pierre Lindenbaum110k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 450 users visited in the last hour