Galaxy | Tool Preview

Reorder individuals (version 1.0.0)

Dataset formats

The input and output datasets are in gd_indivs format.


What it does

The user picks a gd_indivs dataset from their history and specifies a new ordering. This tool creates a new gd_indivs dataset with the individuals reordered as specified by the user.

The new ordering is a list of comma separated ranges (e.g 5,6-12,20). Ranges can be either a single number (e.g. 3) or two dash separated numbers (e.g. 3-5). The numbers represent the line number of gd_indivs dataset. Line numbers that are not listed will appear on the output after the specified line numbers in their same relative ordering.


Example

Input dataset (six rows):

18  McClintock
22  Peltonen-Palotie
26  Sager
30  Franklin
34  Auerbach
38  Stevens

new ordering "1,3-4" will return:

18  McClintock
26  Sager
30  Franklin
22  Peltonen-Palotie
34  Auerbach
38  Stevens

new ordering "3,5,1,6" will return:

26  Sager
34  Auerbach
18  McClintock
38  Stevens
22  Peltonen-Palotie
30  Franklin

new ordering "3-1,6,4-5" will return:

26  Sager
22  Peltonen-Palotie
18  McClintock
38  Stevens
30  Franklin
34  Auerbach