Does BEDOPS sort-bed sort in the same order as sort -k1,1 -k2,2n?
2
0
Entering edit mode
9.5 years ago
eford.dna • 0

Does anyone know if BEDOPS sort-bed sorts in the same order as sort -k1,1 -k2,2n?

BEDOPS • 2.7k views
ADD COMMENT
1
Entering edit mode
9.5 years ago

The sort-bed tool applies a lexicographical sort on the first column (chromosome), a numerical sort on the second column (start position) and then a numerical sort on the third column (stop position) on ties for the second column.

This is not equivalent to the GNU sort options you list, which only sort on the first and second columns and ignore start position ties. In any case, BEDOPS sort-bed will still run faster than the equivalent three-column GNU sort, even with parallelization.

ADD COMMENT
0
Entering edit mode

FWIW, the equivalent on GNU sort would be 'sort -k 1,1V -k 2,2n'

ADD REPLY
0
Entering edit mode
9.5 years ago
eford.dna • 0

O.k. thanks. It does run at seeming light speeds faster then GNU sort, so it's definitely worth switching to. But it's good to know that files I've previously sorted with GNU sort are not exactly the same (although the same for files with no ties in the start position). Thanks!!!!

ADD COMMENT

Login before adding your answer.

Traffic: 2438 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6