Entering edit mode
5.1 years ago
dzisis1986
▴
70
Hello I have a file test.bed like this :
chr2 3300000 3499999 0 0.013255902570394
chr3 300000 499999 0 0.015744466292456
chr4 9400000 9599999 0 0.045555030342908
chr5 1700000 1899999 0 0.013255902570394
chr5 23900000 24099999 0 0.037583056937021
chr5 3000000 3199999 0 2.62328977303342E-06
chr5 3100000 3299999 0 1.61951552785474E-08
chr5 3200000 3399999 0 0.001461420574531
chr5 3700000 3899999 0 0.013255902570394
chr5 3800000 3999999 0 0.013255902570394
I would like to merge intervals that are overlapping and create a new merged.bed file like this :
chr2 3300000 3499999
chr3 300000 499999
chr4 9400000 9599999
chr5 1700000 1899999
chr5 3000000 3399999
chr5 3700000 3999999
chr5 23900000 24099999
I already did this but something is wrong with sort , maybe the fact that there are different chr and when i use bedtools merge i have an error like :
you should have told us
how did you sort the file. what was the command line ?
i used different sort command like sortBed -i and also sort -n -k1.11 -nk2,2 . but still the same problem !