I'm getting an error from bedops telling me that my bed files are not properly sorted by the chromosome column. In the documentation examples, they show using chr1
etc. (i.e. having the chr
prefix). But my file seems properly sorted to me. Does it want actually a lexicographic sort?
balter$ bedops -i --header /home/peaks/mock_PROT_A_peaks.bed /home/peaks/mock_PROT_B_peaks.bed > test
May use bedops --help for more help.
Error: in /home/peaks/mock_PROT_A_peaks.bed
Bed file not properly sorted by first column.
See row: 30306
However,
balter$ awk 'FNR>30300 && FNR < 30310' /home/peaks/mock_PROT_A_peaks.bed
chr9 134907600 134907999 22 11 25.4418777792 2.18579500325 0.000323032637977 0.000563316911961
chr9 135992800 135993699 45 11 34.6380493632 4.47094432483 1.32335307676e-16 1.90501094493e-15
chr9 137355100 137355799 35 22 29.6971256766 1.73870057077 0.000897204802733 0.00140794992995
chr9 137845000 137846499 106 83 104.265196268 1.39574861653 0.000447638610513 0.000754290268942
chr9 138231400 138233499 92 91 84.425639067 1.10490736428 0.155735020989 0.164059393875
chr10 9900 10499 173 139 75.4529239821 1.36022494807 4.74667469274e-05 0.000101396628238
chr10 986300 988799 53 5 40.0327338617 11.5847135172 2.23116300204e-38 1.26287874397e-36
chr10 3468000 3468899 31 8 27.783851556 4.2349778188 1.48954143838e-11 1.17880566911e-10
chr10 3780600 3786299 219 45 188.650887904 5.31876784125 1.16948486655e-84 1.97787366782e-82
and
balter$ cut -f1 /home/peaks/mock_BRD4_A_peaks.bed | uniq
# Chromosome
chr1
chr2
chr3
chr4
chr5
chr6
chr7
chr8
chr9
chr10
chr11
chr12
chr13
chr14
chr15
chr16
chr17
chr18
chr19
chr20
chr21
chr22
chrX
chrY
This thread seems to match your question: http://seqanswers.com/forums/showthread.php?t=43409