|
0
|
1 <tool id="sort_rows" name="Sort a row" version="0.0.1">
|
|
|
2 <description>according to their columns</description>
|
|
|
3 <command>python -c 'for line in ["\t".join(sorted(line.strip().split("\t"))) for line in open("$input").readlines() ]: print line' > $outfile</command>
|
|
|
4 <inputs>
|
|
|
5 <param format="tabular" name="input" type="data" label="Tabular file that should be sorted"/>
|
|
|
6 </inputs>
|
|
|
7 <outputs>
|
|
|
8 <data format="tabular" name="outfile" metadata_source="input"/>
|
|
|
9 </outputs>
|
|
|
10 <options sanitize="False"/>
|
|
|
11 <tests>
|
|
|
12
|
|
|
13 </tests>
|
|
|
14 <help>
|
|
|
15
|
|
|
16 .. class:: infomark
|
|
|
17
|
|
|
18 **TIP:** If your data is not TAB delimited, use *Text Manipulation->Convert*
|
|
|
19
|
|
|
20 **What it does**
|
|
|
21
|
|
|
22 That tool sorts each row in a TAB separated file, according to their columns. In other words: It is a sorted reordering of all columns.
|
|
|
23
|
|
|
24
|
|
|
25 </help>
|
|
|
26 </tool>
|