Does anyone know if BEDOPS sort-bed sorts in the same order as sort -k1,1 -k2,2n
?
Does anyone know if BEDOPS sort-bed sorts in the same order as sort -k1,1 -k2,2n
?
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.
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!!!!
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
FWIW, the equivalent on GNU sort would be 'sort -k 1,1V -k 2,2n'