Question: Intersectbed Overlap
2
gravatar for Nicolas Rosewick
7.7 years ago by
Belgium, Brussels
Nicolas Rosewick7.9k wrote:

Hi,

I've a question about intersectBed. Is it possible to extract only alignment like this :

chromosome ===============================================================
BED/BAM A               ==============              =================
BED FILE B               ============
RESULT                  ==============

But no alignment like this (even if the read overlapp 100% of the feature, I don't want to extract these reads)

chromosome ===============================================================
BED/BAM A    =========================              =================
BED FILE B               =============
RESULT

So, only extracting reads that have 90-95% of its sequence overlapping 90-95% of the feature.

Is it clear ?

Thanks,

N.

bedtools overlap intersect • 3.1k views
ADD COMMENTlink written 7.7 years ago by Nicolas Rosewick7.9k
4
gravatar for Damian Kao
7.7 years ago by
Damian Kao15k
USA
Damian Kao15k wrote:

There are these options in intersectBed:

-f  Minimum overlap required as a fraction of A.
    - Default is 1E-9 (i.e., 1bp).
    - FLOAT (e.g. 0.50)

-r  Require that the fraction overlap be reciprocal for A and B.
    - In other words, if -f is 0.90 and -r is used, this requires
      that B overlap 90% of A and A _also_ overlaps 90% of B.
ADD COMMENTlink written 7.7 years ago by Damian Kao15k

Thanks I didn't see the -t parameter. Sorry

ADD REPLYlink written 7.7 years ago by Nicolas Rosewick7.9k

Thanks I didn't see the -r parameter. Sorry – NicoBxl 0 secs ago

ADD REPLYlink written 7.7 years ago by Nicolas Rosewick7.9k

Thanks I didn't see the -r parameter. Sorry

ADD REPLYlink written 7.7 years ago by Nicolas Rosewick7.9k
0
gravatar for Alex Reynolds
7.1 years ago by
Alex Reynolds28k
Seattle, WA USA
Alex Reynolds28k wrote:

Another option is the use of the bedops tool in the BEDOPS suite, in which you can perform set operations on two (or more) BED files.

For example:

$ bedops -e -90% B.bed A.bed

will return all elements of B.bed which overlap elements in A.bed by 90 or more percent. You can also specify overlap criteria by bases, instead of percent.

There are other set operations and the documentation for bedops provides examples for them, but please let me know if you have any questions.

ADD COMMENTlink modified 4.6 years ago • written 7.1 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: 1632 users visited in the last hour