Entering edit mode
3.5 years ago
star
▴
350
I have a table of genomic regions that I would like to split them in half until all regions are in at most 1000 bp long.
I have tried the bedops --chop 1000 data
but it doesn`t work and it gave me some regions with 1 bp length.
Data :
chr start end length center of region
chr1 500 3000 2500 1750
chr2 100 1100 1000 600
chr4 20 1900 1880 960
results:
chr start end length
chr1 500 1125 625
chr1 1125 1750 625
chr1 1750 2375 625
chr1 2375 3000 625
chr2 100 1100 1000
chr4 20 960 940
chr4 960 1900 940