Question: BedTools intersect - Segmentation fault
0
gravatar for Maria333
3.7 years ago by
Maria33310
European Union
Maria33310 wrote:

Hi,

Has anyone experienced the "segmentation fault" error while trying to use bedtools intersect option? I am trying to see overlap exons between 2 bed files but I'm getting this error all the time. Any help will be much appreciated.

Thank you

human exons bedtools • 2.6k views
ADD COMMENTlink modified 3.7 years ago by Alex Reynolds28k • written 3.7 years ago by Maria33310

Output of three commands: `ẁhich bedtools`, `bedtools --version` and `uname -a` could be helpful to know about your setup

ADD REPLYlink written 3.7 years ago by biocyberman760
4
gravatar for geek_y
3.7 years ago by
geek_y9.4k
Barcelona/CRG/London/Imperial
geek_y9.4k wrote:

If you are working with very large files, sort the bed files based on Chr and then Pos.  sort -k1,1 -k2,2n and then use -sorted option.

From manual

-sorted    For very large B files, invoke a “sweeping” algorithm that requires position-sorted (e.g., sort -k1,1 -k2,2n for BED files) input. When using -sorted, memory usage remains low even for very large files

If you still face the problem, split the files by Chr and then try to run the program at chromosome level. Otherwise provide more details about your data and post the exact error

 

ADD COMMENTlink modified 3.7 years ago • written 3.7 years ago by geek_y9.4k

Thank you very much for that, it helped a lot. I sorted the bed file and then used  sort -k1,1V to reverse the order so it is in ascending order.. Now I get the error: Error: The genome file sorted.bed.ascending has no valid entries. Exiting. 

Do you know why is this? The files seem fine now.. 

Thank you once again!

ADD REPLYlink written 3.7 years ago by Maria33310
1

can you post few lines from your files ?

ADD REPLYlink written 3.7 years ago by geek_y9.4k
0
gravatar for Alex Reynolds
3.7 years ago by
Alex Reynolds28k
Seattle, WA USA
Alex Reynolds28k wrote:

Another option:

$ sort-bed exons1.bed > sorted_exons1.bed
$ sort-bed exons2.bed > sorted_exons2.bed
$ bedops --element-of 1 sorted_exons1.bed sorted_exons2.bed > exons1_that_overlap_exons2.bed
$ bedops --element-of 1 sorted_exons2.bed sorted_exons1.bed > exons2_that_overlap_exons1.bed
ADD COMMENTlink written 3.7 years ago by Alex Reynolds28k
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: 1849 users visited in the last hour