Dear all,
I have a bed file below. I want to split the bed file based on base length (3 kb) between the start and the end position. For example, from the start position 12109 to the end position 14678 should be in one file, as these are in 3kb range.the start position 15573 and the end position 15612 should be in another file and so on.
Sp_chr1 12109 12149 DNA Sequences
Sp_chr1 12348 12388 DNA Sequences
Sp_chr1 12493 12533 DNA Sequences
Sp_chr1 12616 12656 DNA Sequences
Sp_chr1 12746 12786 DNA Sequences
Sp_chr1 14486 14521 DNA Sequences
Sp_chr1 14525 14564 DNA Sequences
Sp_chr1 14638 14678 DNA Sequences
Sp_chr1 15573 15612 DNA Sequences
Sp_chr1 20498 20538 DNA Sequences
Sp_chr1 21628 21668 DNA Sequences
Sp_chr1 25346 25386 DNA Sequences
Sp_chr1 26053 26093 DNA Sequences
Sp_chr1 26129 26169 DNA Sequences
Sp_chr1 27874 27913 DNA Sequences
Unclear. Please add a representative output.
Hi, 2999 bp length from the start position to the end is the splitting condition.
The first file should include these:
The second file should include this:
The third file should include these:
I don't get it : 15612-15573 = 39 , you could have added the next lines.
sorry for confusing. 15573 plus 2999 equals 18572, but next start position is 20498. Therefore, below ones should be separated.
and