Entering edit mode
4.1 years ago
kimkes25
▴
50
Hello
I have a bed file that looks like this:
I would like to be able to retrieve data from it using samtools with tabix.
the actions I do:
bgzip sample.bed
tabix -s 1 -b 2 -e 3 sample.bed.gz
tabix sample.bed.gz chr1:19922842-19924305
but I have a problem after trying the second action, it returns this error:
Unsorted positions on sequence #1: 244318174 followed by 1179391
what can I do?
Even though unix sort will probably be faster you could also sort
sample.bed
with bedtools (default parameters are probably fine)In addition to the first row (header), you also need to drop the first column as BED format is defined with
chr, start, end
in the first three columns.