Hello, I am using bedtools intersect and I'm failing to reproduce one of the examples in the documentation, bedtools intersect
I am using bedtools v2.25.0
In section "-r, and -f Requiring reciprocal minimal overlap fraction", the very simple example provided there is:
$ cat A.bed
chr1 100 200
$ cat B.bed
chr1 130 201
chr1 130 200000
$ bedtools intersect -a A.bed -b B.bed -f 0.50 -r -wa -wb
chr1 100 200 chr1 130 201
Well, in my case, when I try to force reciprocal overlap, the behavior is not what I expected. My output is:
$ cat A.bed
chr1 100 200
$ cat B.bed
chr1 130 201
chr1 130 200000
$ bedtools intersect -a A.bed -b B.bed -f 0.50 -wa -wb
chr1 100 200 chr1 130 201
chr1 100 200 chr1 130 200000
$ bedtools intersect -a A.bed -b B.bed -f 0.50 -r -wa -wb
chr1 100 200 chr1 130 201
chr1 100 200 chr1 130 200000
Last output is different from the example. -r seems to be ignored, I only get the expected reciprocal result manually using -F:
$ bedtools intersect -a A.bed -b B.bed -f 0.50 -F 0.50 -wa -wb
chr1 100 200 chr1 130 201
Using -f and -r should be the same than using -f and -F, right?
Does anyone have any idea of what I'm missing?
Thank you so much for your feedback!
I am using bedtools v2.25.0
In section "-r, and -f Requiring reciprocal minimal overlap fraction", the very simple example provided there is:
$ cat A.bed
chr1 100 200
$ cat B.bed
chr1 130 201
chr1 130 200000
$ bedtools intersect -a A.bed -b B.bed -f 0.50 -r -wa -wb
chr1 100 200 chr1 130 201
Well, in my case, when I try to force reciprocal overlap, the behavior is not what I expected. My output is:
$ cat A.bed
chr1 100 200
$ cat B.bed
chr1 130 201
chr1 130 200000
$ bedtools intersect -a A.bed -b B.bed -f 0.50 -wa -wb
chr1 100 200 chr1 130 201
chr1 100 200 chr1 130 200000
$ bedtools intersect -a A.bed -b B.bed -f 0.50 -r -wa -wb
chr1 100 200 chr1 130 201
chr1 100 200 chr1 130 200000
Last output is different from the example. -r seems to be ignored, I only get the expected reciprocal result manually using -F:
$ bedtools intersect -a A.bed -b B.bed -f 0.50 -F 0.50 -wa -wb
chr1 100 200 chr1 130 201
Using -f and -r should be the same than using -f and -F, right?
Does anyone have any idea of what I'm missing?
Thank you so much for your feedback!