sort -S 2G $unique
#for $key in $sortkeys
'-k ${key.column},${key.column}${key.order}${key.style}'
#end for
$input > $out_file1
**What it does**
This tool runs the unix **sort** command on the selected data file.
-----
**Sorting Styles**
* **Fast Numeric**: sort by numeric values. Handles integer values (e.g. 43, 134) and decimal-point values (e.g. 3.14). *Does not* handle scientific notation (e.g. -2.32e2).
* **General Numeric**: sort by numeric values. Handles all numeric notations (including scientific notation). Slower than *fast numeric*, so use only when necessary.
* **Natural Sort**: Sort in 'natural' order (natural to humans, not to computers). See example below.
* **Alphabetical sort**: Sort in strict alphabetical order. See example below.
**Sorting Examples**
Given the following list::
chr4
chr13
chr1
chr10
chr20
chr2
**Alphabetical sort** would produce the following sorted list::
chr1
chr10
chr13
chr2
chr20
chr4
**Natural Sort** would produce the following sorted list::
chr1
chr2
chr4
chr10
chr13
chr20
.. class:: infomark
If you're planning to use the file with another tool that expected sorted files (such as *join*), you should use the **Alphabetical sort**, not the **Natural Sort**. Natural sort order is easier for humans, but is unnatural for computer programs.