view sort_rows.xml @ 0:ec66f9d90ef0 draft

initial uploaded
author bgruening
date Thu, 05 Sep 2013 04:58:21 -0400
parents
children 7068d1548234
line wrap: on
line source

<tool id="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>

.. class:: infomark

**TIP:** If your data is not TAB delimited, use *Text Manipulation-&gt;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>
</tool>