annotate sort.xml @ 30:5907d248dee3 draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
author bgruening
date Sat, 17 Jan 2026 00:56:56 +0000
parents 4f7cade041cb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26
f22a309187a3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
bgruening
parents: 18
diff changeset
1 <tool id="tp_sort_header_tool" name="Sort" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
1
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
2 <description>data in ascending or descending order</description>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
3 <macros>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
4 <import>macros.xml</import>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
5 </macros>
26
f22a309187a3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
bgruening
parents: 18
diff changeset
6 <expand macro="creator"/>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
7 <expand macro="requirements">
30
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
8 <requirement type="package" version="4.9">sed</requirement>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
9 </expand>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
10 <version_command>sort --version | head -n 1</version_command>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
11 <command>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
12 <![CDATA[
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
13 (
29
4f7cade041cb planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 4dd118c84ed4d6157303e71438c24446ec4b4f31
bgruening
parents: 27
diff changeset
14 export LC_ALL=C;
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
15 #if int($header) > 0:
7
d64eace4f9f3 Uploaded
bgruening
parents: 6
diff changeset
16 sed -u '${header}'q &&
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
17 #end if
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
18
30
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
19 sort $unique --stable -t ' '
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
20
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
21 #for $key in $sortkeys:
30
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
22 #if $key.start_charpos and $key.end_charpos:
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
23 -k ${key.column}.${key.start_charpos}${key.ignore_leading_blanks},${key.column}.${key.end_charpos}${key.ignore_leading_blanks}${key.order}${key.style}${key.ignore_case}
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
24 #elif $key.start_charpos:
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
25 -k ${key.column}.${key.start_charpos}${key.ignore_leading_blanks},${key.column}${key.order}${key.style}${key.ignore_case}
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
26 #elif $key.end_charpos:
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
27 -k ${key.column}${key.ignore_leading_blanks},${key.column}.${key.end_charpos}${key.ignore_leading_blanks}${key.order}${key.style}${key.ignore_case}
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
28 #else:
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
29 -k ${key.column}${key.ignore_leading_blanks},${key.column}${key.order}${key.style}${key.ignore_case}
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
30 #end if
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
31 #end for
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
32
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
33 ) < '${infile}' > '${outfile}'
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
34 ]]>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
35 </command>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
36 <inputs>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
37 <param format="tabular" name="infile" type="data" label="Sort Query" />
10
c78b1767db2b planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents: 8
diff changeset
38 <param name="header" type="integer" value="0"
30
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
39 label="Number of header lines" help="Header lines will be copied to the output unchanged without operating on them.">
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
40 <validator type="in_range" message="Negative values are not allowed." min="0"/>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
41 </param>
30
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
42
1
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
43 <repeat name="sortkeys" title="Column selections" min="1">
30
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
44 <param name="column" label="Sort on column" type="data_column" data_ref="infile" accept_default="true" />
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
45 <param name="start_charpos" label="considering its characters from" type="integer" min="1" optional="true" help="Leave empty (or set to 1) to use the column value starting from its first character." />
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
46 <param name="end_charpos" label="to and including" type="integer" min="1" optional="true" help="Leave empty to use the column value up to and including its last character." />
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
47 <param name="order" type="select" display="radio" label="in">
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
48 <option value="">Ascending order</option>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
49 <option value="r">Descending order</option>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
50 </param>
30
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
51 <param name="style" type="select" display="radio" label="using sort flavor">
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
52 <option value="n">Fast numeric sort (-n)</option>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
53 <option value="g">General numeric sort ( scientific notation -g)</option>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
54 <option value="V">Natural/Version sort (-V) </option>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
55 <option value="">Alphabetical sort</option>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
56 <option value="h">Human-readable numbers (-h)</option>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
57 <option value="R">Random order (-R)</option>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
58 </param>
30
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
59 <param name="ignore_case" type="boolean" checked="false" truevalue="f" falsevalue=""
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
60 label="ignoring case" help="Turn lowercase symbols to upper case before comparing values in this column. (-f)" />
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
61 <param name="ignore_leading_blanks" type="boolean" checked="false" truevalue="b" falsevalue=""
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
62 label="ignoring leading blanks" help="This option can be useful with Alphabetical and Natural sort (which treat spaces as actual characters) or to prevent unwanted offsets if you specified a range of character positions to consider." />
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
63 </repeat>
1
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
64
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
65 <param name="unique" type="boolean" checked="false" truevalue="--unique" falsevalue=""
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
66 label="Output unique values" help="Print only unique values, based on sorted key columns. See help section for details. (--unique)" />
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
67 </inputs>
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
68 <outputs>
6
8928e6d1e7ba Uploaded
bgruening
parents: 4
diff changeset
69 <data name="outfile" format_source="infile" metadata_source="infile"/>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
70 </outputs>
1
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
71 <tests>
30
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
72 <test expect_num_outputs="1">
6
8928e6d1e7ba Uploaded
bgruening
parents: 4
diff changeset
73 <param name="infile" value="sort1.bed"/>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
74 <param name="header" value="3"/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
75 <repeat name="sortkeys">
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
76 <param name="column" value="1"/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
77 <param name="style" value=""/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
78 <param name="order" value=""/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
79 </repeat>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
80 <repeat name="sortkeys">
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
81 <param name="column" value="3"/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
82 <param name="style" value="n"/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
83 <param name="order" value="r"/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
84 </repeat>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
85 <output name="outfile" file="sort_result1.bed"/>
1
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
86 </test>
30
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
87 <test expect_num_outputs="1">
6
8928e6d1e7ba Uploaded
bgruening
parents: 4
diff changeset
88 <param name="infile" value="sort1.bed"/>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
89 <param name="header" value="3"/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
90 <repeat name="sortkeys">
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
91 <param name="column" value="1"/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
92 <param name="style" value=""/>
8
fa7f88da29d7 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 369e40078146d00608d52205bb8cee66ae735b76-dirty
bgruening
parents: 7
diff changeset
93 <param name="order" value=""/>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
94 </repeat>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
95 <repeat name="sortkeys">
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
96 <param name="column" value="3"/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
97 <param name="style" value="n"/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
98 <param name="order" value=""/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
99 </repeat>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
100 <output name="outfile" file="sort_result2.bed"/>
1
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
101 </test>
30
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
102 <test expect_num_outputs="1">
6
8928e6d1e7ba Uploaded
bgruening
parents: 4
diff changeset
103 <param name="infile" value="sort2.bed"/>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
104 <repeat name="sortkeys">
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
105 <param name="column" value="5"/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
106 <param name="style" value="g"/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
107 <param name="order" value=""/>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
108 </repeat>
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
109 <output name="outfile" file="sort_result3.bed"/>
1
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
110 </test>
30
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
111 <test expect_num_outputs="1">
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
112 <param name="infile" value="sort3.tabular"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
113 <param name="header" value="0"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
114 <param name="unique" value="false"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
115 <repeat name="sortkeys">
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
116 <param name="column" value="2"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
117 <param name="start_charpos" value="7"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
118 <param name="order" value=""/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
119 <param name="style" value="n"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
120 </repeat>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
121 <repeat name="sortkeys">
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
122 <param name="column" value="2"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
123 <param name="start_charpos" value="4"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
124 <param name="end_charpos" value="5"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
125 <param name="order" value=""/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
126 <param name="style" value="n"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
127 </repeat>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
128 <repeat name="sortkeys">
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
129 <param name="column" value="2"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
130 <param name="start_charpos" value="1"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
131 <param name="end_charpos" value="2"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
132 <param name="order" value="r"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
133 <param name="style" value="n"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
134 </repeat>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
135 <output name="outfile" file="sorted3.tabular" ftype="tabular" />
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
136 </test>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
137 <!-- Test ignore_case param -->
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
138 <test expect_num_outputs="1">
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
139 <param name="infile" value="sort4.tabular"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
140 <param name="header" value="1"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
141 <param name="unique" value="false"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
142 <repeat name="sortkeys">
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
143 <param name="column" value="1"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
144 <param name="order" value=""/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
145 <param name="style" value=""/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
146 <param name="ignore_case" value="true"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
147 </repeat>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
148 <repeat name="sortkeys">
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
149 <param name="column" value="3"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
150 <param name="order" value="r"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
151 <param name="style" value="n"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
152 </repeat>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
153 <output name="outfile" file="sorted4_partial.tabular" ftype="tabular" />
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
154 </test>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
155 <!-- Test ignore_leading_blanks param -->
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
156 <test expect_num_outputs="1">
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
157 <param name="infile" value="sort4.tabular"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
158 <param name="header" value="1"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
159 <param name="unique" value="false"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
160 <repeat name="sortkeys">
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
161 <param name="column" value="1"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
162 <param name="start_charpos" value="1"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
163 <param name="end_charpos" value="4"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
164 <param name="order" value=""/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
165 <param name="style" value=""/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
166 <param name="ignore_case" value="true"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
167 <param name="ignore_leading_blanks" value="true"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
168 </repeat>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
169 <repeat name="sortkeys">
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
170 <param name="column" value="1"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
171 <param name="start_charpos" value="5"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
172 <param name="order" value=""/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
173 <param name="style" value=""/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
174 <param name="ignore_case" value="true"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
175 <param name="ignore_leading_blanks" value="true"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
176 </repeat>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
177 <repeat name="sortkeys">
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
178 <param name="column" value="3"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
179 <param name="order" value="r"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
180 <param name="style" value="n"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
181 <param name="ignore_leading_blanks" value="true"/>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
182 </repeat>
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
183 <output name="outfile" file="sorted4.tabular" ftype="tabular" />
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
184 </test>
1
a4ad586d1403 Uploaded
bgruening
parents: 0
diff changeset
185 </tests>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
186 <help>
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
187 <![CDATA[
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
188 **What it does**
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
189
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
190 This tool sorts an input file.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
191
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
192 -----
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
193
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
194 **Sorting Styles**
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
195
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
196 * **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).
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
197 * **General Numeric**: sort by numeric values. Handles all numeric notations (including scientific notation). Slower than *fast numeric*, so use only when necessary.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
198 * **Natural Sort**: Sort in 'natural' order (natural to humans, not to computers). See example below.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
199 * **Alphabetical sort**: Sort in strict alphabetical order. See example below.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
200 * **Human-readable numbers**: Sort human readble numbers (e.g. 1G > 2M > 3K > 400)
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
201 * **Random order**: return lines in random order.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
202
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
203 ------
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
204
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
205 **Example - Header line**
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
206
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
207 **Input file** (note first line is a header line, should not be sorted)::
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
208
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
209 Fruit Color Price
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
210 Banana Yellow 4.1
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
211 Avocado Green 8.0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
212 Apple Red 3.0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
213 Melon Green 6.1
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
214
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
215 **Sorting** by **numeric order** on column **3**, with **header**, will return::
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
216
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
217 Fruit Color Price
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
218 Apple Red 3.0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
219 Banana Yellow 4.1
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
220 Melon Green 6.1
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
221 Avocado Green 8.0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
222
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
223
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
224 -----
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
225
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
226 **Example - Natural vs. Alphabetical sorting**
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
227
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
228 Given the following list::
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
229
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
230 chr4
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
231 chr13
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
232 chr1
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
233 chr10
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
234 chr20
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
235 chr2
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
236
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
237 **Alphabetical sort** would produce the following sorted list::
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
238
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
239 chr1
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
240 chr10
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
241 chr13
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
242 chr2
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
243 chr20
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
244 chr4
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
245
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
246 **Natural Sort** would produce the following sorted list::
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
247
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
248 chr1
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
249 chr2
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
250 chr4
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
251 chr10
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
252 chr13
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
253 chr20
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
254
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
255
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
256 .. class:: infomark
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
257
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
258 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.
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
259
30
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
260 -----
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
261
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
262 **Example - Sorting based on parts of column values**
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
263
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
264 The above column of chromosomes, with their constant prefix, could have been sorted in natural order also with the **Fast numeric sort** and **considering its characters from** character 4 only.
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
265
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
266 In general, sorting based on just a range of characters in a column can be useful for sorting values with internal structure, in a single tool run.
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
267
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
268 Consider, for example, the following column of dates, which is unfortunately not ISO-8601 formatted::
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
269
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
270 10/24/2025
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
271 09/18/1974
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
272 12/16/1998
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
273 03/04/2007
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
274
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
275 You could modify these values with other tools first, but you can achieve correct chronological sort order with a single run of the sort tool like this:
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
276
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
277 - Do a **Fast numeric sort** on the column **considering its characters from** character 7 (the start of the year).
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
278 - Resolve ties (using another column selection section) with another **Fast numeric sort** on the same column **considering its characters from** character 1 **to and including** character 2 (the month representation).
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
279 - Resolve remaining ties with a third **Fast numeric sort** on again the same column **considering its characters from** character 4 **to and including** character 5 (the day representation).
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
280
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
281 This will result in the ascending chronological order::
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
282
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
283 09/18/1974
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
284 11/17/1998
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
285 11/18/1998
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
286 12/16/1998
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
287 03/04/2007
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
288 10/24/2025
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
289
5907d248dee3 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 28d2fcf2649b999762fbd94bd648485b916f2f0d
bgruening
parents: 29
diff changeset
290 Before relying on in-column character ranges, make extra sure that all values are formatted consistently (in the above example, that all dates use two digits for days and months and the same overall date format).
4
56e80527c482 Uploaded
bgruening
parents: 3
diff changeset
291 ]]>
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
292 </help>
14
7725ab6dab67 planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b'e6ee273f75fff61d1e419283fa8088528cf59470\n'
bgruening
parents: 13
diff changeset
293 <expand macro="citations" />
0
ec66f9d90ef0 initial uploaded
bgruening
parents:
diff changeset
294 </tool>