how can I extract intervals from bed file spanning a max larger interval in a windowed mode without disrupting intervals?
0
0
Entering edit mode
20 months ago
serpalma.v ▴ 70

Hello!

Given this bed file:

1       101 300
1       500 800
1       801 895
1       1001 1250
1       1350 2000
1       2200 2350
1       2500 2700


I would like to separate it into chunks of max 900bp without disrupting intervals. According to the example, that would be:

chunk1: the span is less than 900bp

1       101 300
1       500 800
1       801 895


chunk2: short span less than 900bp

1       1001 1250


chunk3: short span less than 900bp

1       1350 2000


chunk3: whatever is left

1       2200 2350
1       2500 2700


I've tried to figure out this, nut I cannot come out with the right combination of operations either from betools nor bedops.

I would really appreciate some help with this!

sequencing bed bedtools bedops • 330 views