Welcome to Galaxy
It appears that you found this tool from a link outside of Galaxy. If you're not familiar with Galaxy, please consider visiting the welcome page. To learn more about what Galaxy is and what it can do for you, please visit the Galaxy wiki.

Sort (Galaxy tool version 1.0.3)
Column selections

TIP: If your data is not TAB delimited, use Text Manipulation->Convert


Syntax

This tool sorts the dataset on any number of columns in either ascending or descending order.

  • Numerical sort orders numbers by their magnitude, ignores all characters besides numbers, and evaluates a string of numbers to the value they signify.
  • General numeric sort orders numbers by their general numerical value. Unlike the numerical sort option, it can handle numbers in scientific notation too.
  • Alphabetical sort is a phonebook type sort based on the conventional order of letters in an alphabet. Each nth letter is compared with the nth letter of other words in the list, starting at the first letter of each word and advancing to the second, third, fourth, and so on, until the order is established. Therefore, in an alphabetical sort, 2 comes after 100 (1 < 2).

Examples

The list of numbers 4,17,3,5 collates to 3,4,5,17 by numerical sorting, while it collates to 17,3,4,5 by alphabetical sorting.

Sorting the following:

Q     d    7   II    jhu  45
A     kk   4   I     h    111
Pd    p    1   ktY   WS   113
A     g    10  H     ZZ   856
A     edf  4   tw    b    234
BBB   rt   10  H     ZZ   100
A     rew  10  d     b    1111
C     sd   19  YH    aa   10
Hah   c    23  ver   bb   467
MN    gtr  1   a     X    32
N     j    9   a     T    205
BBB   rrf  10  b     Z    134
odfr  ws   6   Weg   dew  201
C     f    3   WW    SW   34
A     jhg  4   I     b    345
Pd    gf   7   Gthe  de   567
rS    hty  90  YY    LOp  89
A     g    10  H     h    43
A     g    4   I     h    500

on columns 1 (alphabetical), 3 (numerical), and 6 (numerical) in ascending order will yield:

A     kk   4   I     h    111
A     edf  4   tw    b    234
A     jhg  4   I     b    345
A     g    4   I     h    500
A     g    10  H     h    43
A     g    10  H     ZZ   856
A     rew  10  d     b    1111
BBB   rt   10  H     ZZ   100
BBB   rrf  10  b     Z    134
C     f    3   WW    SW   34
C     sd   19  YH    aa   10
Hah   c    23  ver   bb   467
MN    gtr  1   a     X    32
N     j    9   a     T    205
odfr  ws   6   Weg   dew  201
Pd    p    1   ktY   WS   113
Pd    gf   7   Gthe  de   567
Q     d    7   II    jhu  45
rS    hty  90  YY    LOp  89

Sorting the following:

chr10  100  200  feature1  100.01   +
chr20  800  900  feature2  1.1      +
chr2   500  600  feature3  1000.1   +
chr1   300  400  feature4  1.1e-05  +
chr21  300  500  feature5  1.1e2    +
chr15  700  800  feature6  1.1e4    +

on column 5 (numerical) in ascending order will yield:

chr1   300  400  feature4  1.1e-05  +
chr15  700  800  feature6  1.1e4    +
chr20  800  900  feature2  1.1      +
chr21  300  500  feature5  1.1e2    +
chr10  100  200  feature1  100.01   +
chr2   500  600  feature3  1000.1   +

on column 5 (general numeric) in ascending order will yield:

chr1   300  400  feature4  1.1e-05  +
chr20  800  900  feature2  1.1      +
chr10  100  200  feature1  100.01   +
chr21  300  500  feature5  1.1e2    +
chr2   500  600  feature3  1000.1   +
chr15  700  800  feature6  1.1e4    +