Question: Observing merged genomic intervals along with their original unmerged intervals
0
gravatar for arsala521
12 months ago by
arsala52110
arsala52110 wrote:

Hello everyone,

Is there any option in bedtools or bedops that after merging show the original regions of the merged interval as well?

For example for the following input

chr1 500 1000
chr1 750 1000
chr2 200 500

can I have the output somewhat like this

chr1 500 1000 chr1 500 1000 chr1 750 1000
chr2 200 500

For every merged region, I want to see the original regions along with it.

Thank you

merging bedtools • 199 views
ADD COMMENTlink modified 11 months ago by Kevin Blighe71k • written 12 months ago by arsala52110
0
gravatar for Kevin Blighe
11 months ago by
Kevin Blighe71k
Republic of Ireland
Kevin Blighe71k wrote:

There is definitely an awk solution here; however, you may try out BEDTools:

cat test.bed 
chr1    500 1000
chr1    750 1000
chr2    200 500

bedtools merge -i test.bed -c 1,2,3 -o distinct -delim " "
chr1    500 1000    chr1    500 750 1000
chr2    200 500     chr2    200 500

Give that a try.

Kevin

ADD COMMENTlink modified 11 months ago • written 11 months ago by Kevin Blighe71k
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: 995 users visited in the last hour
_