Question: intersectBed Segmentation fault or Received illegal bin number
2
gravatar for Ct586
4.6 years ago by
Ct586540
China
Ct586540 wrote:

I have met an weird error.

Here lists my two bed files

```

==> a.bed <==

chr1 645339590 645344590
chr1 645485603 645490603
chr1 646267584 646272584
chr1 651156159 651161159
chr1 652224601 652234601
chr1 654584466 654589466
chr1 656200028 656210028
chr1 658335720 658345720
chr1 672881471 672886471
chr1 673481036 673486036

==> b.bed <==

chr1 567457 567702
chr1 569801 570047
chr1 713857 714086
chr1 714475 714736
chr1 762251 763163
chr1 762416 762594
chr1 762691 762997
chr1 793349 794537
chr1 800991 801931
chr1 805262 805484

```

When I was running `intersectBed -a a.bed -b b.bed`, there is an error " intersectBed: line 2: 21275 Segmentation fault (core dumped) ${0%/*}/bedtools intersect "$@" ".

When I was running `intersectBed -a b.bed -b a.bed`, there is another error " ERROR: Received illegal bin number 39388 from getBin call. ERROR: Unable to add record to tree. "

I can not figure out what causes this. Thanks for the help.

Chen Tong

intersectbed • 7.5k views
ADD COMMENTlink modified 4.6 years ago by Alex Reynolds28k • written 4.6 years ago by Ct586540

What version of bedtools are you using? I tried to reproduce your error using the files you posted and it worked fine, this was with bedtools 2.17.0. So maybe try upgrading to the latest version of bedtools...

ADD REPLYlink written 4.6 years ago by dariober10k

Thanks, the version I am using is bedtools 2.22.1. 

ADD REPLYlink written 4.6 years ago by Ct586540

Anyway I think it is weird since it works fine for you. Maybe I will give bedtools 2.17.0 a try just for curiosity.

ADD REPLYlink written 4.6 years ago by Ct586540

Actually I can reproduce the error myself with bedtools 2.22 (but not with 2.17)
 

ADD REPLYlink written 4.6 years ago by dariober10k
2
gravatar for Pierre Lindenbaum
4.6 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum122k wrote:

@aaronquinlan will confirm but I suspect that the value for chr1 is just to high for the internal 'binning' system of bedtools. See http://genomewiki.ucsc.edu/index.php/Bin_indexing_system

position  max = 536,870,912

but you used

position  max = 673,486,036

 

my idea / hypothesis.

ADD COMMENTlink modified 4.6 years ago • written 4.6 years ago by Pierre Lindenbaum122k

Thanks! That's the problem. This may be a potential bug of `shuffleBed` since the bed file is generated using it with `-chrom` parameter given.

ADD REPLYlink written 4.6 years ago by Ct586540
1
gravatar for Alex Reynolds
4.6 years ago by
Alex Reynolds28k
Seattle, WA USA
Alex Reynolds28k wrote:

You might try BEDOPS:

$ bedops --intersect a.bed b.bed > answer.bed

So long as your input files are sorted, you shouldn't run into these problems.

ADD COMMENTlink modified 4.6 years ago • written 4.6 years ago by Alex Reynolds28k

It is a great choice. Just before trying `bedops`, I found my coordinates are too large, which causing the problem. Anyway, I'd like to try `bedops` since I am attracted by its homepage.

ADD REPLYlink written 4.6 years ago by Ct586540

I am also facing the same error. kindly tell me how i can solve it ?

bedtools intersect -a SPRINT_identified_all.res.col3 -b wheat_col6.bed -wa -wb > output.bed

ERROR: Received illegal bin number 37458 from getBin call.

ERROR: Unable to add record to tree.

ADD REPLYlink written 4 months ago by iqra0
Please log in to add an answer.

Help
Access

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