Mercurial > repos > bgruening > text_processing
view sort_rows.xml @ 21:86755160afbf draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit c2b1677d1c94433f777c2dc28ac8eec0a99cc6a7
author | bgruening |
---|---|
date | Fri, 16 Aug 2024 10:41:54 +0000 |
parents | 12615d397df7 |
children |
line wrap: on
line source
<tool id="tp_sort_rows" name="Sort a row" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> <description>according to their columns</description> <macros> <import>macros.xml</import> </macros> <expand macro="creator"/> <requirements> <requirement type="package" version="3.12">python</requirement> </requirements> <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 name="outfile" format_source="infile" metadata_source="infile"/> </outputs> <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* **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> <expand macro="citations" /> </tool>