Merge/Collapse regions within a certain distance
1
0
Entering edit mode
7.9 years ago
Adrian Pelin ★ 2.6k

Hello, I am sure this has been asked before but I can't find it. Basically:

scaffold_1 100 200
scaffold_1 300 400
scaffold_1 1000 2100

merge features at a minimum proximity of 200bp and:

scaffold_1 100 400
scaffold_1 1000 2100

Is this possible? Thanks, Adrian

bedtools • 1.4k views
ADD COMMENT
1
Entering edit mode
7.9 years ago

bedtools merge with option -d

-d  Maximum distance between features allowed for features
    to be merged.
ADD COMMENT
0
Entering edit mode

Did not realize that would work for only one file. Thanks!

ADD REPLY
0
Entering edit mode

Actually it seems like it takes only one file as input. This makes things complicated in certain cases. Is there any way to only merge features from file A to those of file B, but not merge features within file A or within B?

ADD REPLY

Login before adding your answer.

Traffic: 2531 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6