Mercurial > repos > bgruening > text_processing
diff sort_rows.xml @ 4:56e80527c482 draft
Uploaded
| author | bgruening |
|---|---|
| date | Wed, 07 Jan 2015 11:10:52 -0500 |
| parents | 7068d1548234 |
| children | 8928e6d1e7ba |
line wrap: on
line diff
--- a/sort_rows.xml Sun Oct 06 08:22:36 2013 -0400 +++ b/sort_rows.xml Wed Jan 07 11:10:52 2015 -0500 @@ -1,26 +1,37 @@ -<tool id="tp_sort_rows" name="Sort a row" version="0.0.1"> - <description>according to their columns</description> - <command>python -c 'for line in ["\t".join(sorted(line.strip().split("\t"))) for line in open("$input").readlines() ]: print line' > $outfile</command> - <inputs> - <param format="tabular" name="input" type="data" label="Tabular file that should be sorted"/> - </inputs> - <outputs> - <data format="tabular" name="outfile" metadata_source="input"/> - </outputs> - <options sanitize="False"/> - <tests> - - </tests> - <help> - +<tool id="tp_sort_rows" name="Sort a row" version="@BASE_VERSION@.0"> + <description>according to their columns</description> + <macros> + <import>macros.xml</import> + </macros> + <command> +<![CDATA[ + python -c 'for line in ( "\t".join(sorted(line.strip().split("\t"))) for line in open("$infile") ): print line' > $outfile +]]> + </command> + <inputs> + <param format="tabular" name="infile" type="data" label="Tabular file that should be sorted"/> + </inputs> + <outputs> + <data format="tabular" name="outfile" metadata_source="infile"/> + </outputs> + <options sanitize="False"/> + <tests> + <test> + <param name="infile" value="sort_rows1.tabular" ftype="tabular" /> + <output name="outfile" file="sort_rows_results1.bed"/> + </test> + </tests> + <help> +<![CDATA[ .. class:: infomark -**TIP:** If your data is not TAB delimited, use *Text Manipulation->Convert* +**TIP:** If your data is not TAB delimited, use *Text Manipulation->Convert* **What it does** 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. - -</help> +@REFERENCES@ +]]> + </help> </tool>
