view columnArrange.xml @ 0:f18f67056946 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/column_arrange_by_header commit 088e73e958b55dc765778641b8a84080cc289f85-dirty
author bgruening
date Fri, 16 Oct 2015 14:31:13 -0400
parents
children 6c6d26ff01ff
line wrap: on
line source

<tool id="bg_column_arrange_by_header" name="Column arrange" version="0.1">
    <description>by header name</description>
    <requirements>
        <requirement type="package" version="0.14.1">pandas</requirement>
    </requirements>
    <command interpreter="python">
    <![CDATA[
        column_arrange.py
          --columns
        #for token in $rep_param_columns:
            "$token.param_column"
        #end for
        --in $param_input
        --out $output
    ]]>
    </command>
    <inputs>
        <param format="tabular" name="param_input" type="data" label="file to rearrange" />
        <repeat name ="rep_param_columns" min="1" title="Specify the first few columns by name">
            <param name="param_column" type="text" value="" label="column">
                <sanitizer>
                    <valid initial="string.printable">
                        <remove value="&apos;"/>
                    </valid>
                </sanitizer>
            </param>
        </repeat>
    </inputs>
    <outputs>
        <data format="tabular" name="output" />
    </outputs>
    <tests>
        <test>
            <param name="param_input" value="columnarrange_input1.tab"/>
            <repeat name="rep_param_columns">
                <param name="param_column" value="fname"/>
            </repeat>
            <repeat name="rep_param_columns">
                <param name="param_column" value="age"/>
            </repeat>
            <output name="out" file="columnarrange_result1.tab"/>
        </test>
        <test>
            <param name="param_input" value="columnarrange_input2.tab"/>
            <repeat name="rep_param_columns">
                <param name="param_column" value="first name"/>
            </repeat>
            <repeat name="rep_param_columns">
                <param name="param_column" value="nationality"/>
            </repeat>
            <output name="out" file="columnarrange_result2.tab"/>
        </test>
    </tests>
    <help>
**What it does**

With this tool you can specify (by naming the header) which columns need to be leftmost.
The columns which are not specified will be ordered as before, right of the columns which were specified.

Input file::

    AHeader BHeader CHeader DHeader
    a       b       c       d
    a       b       c       d

Specifying **CHeader** and **BHeader**, as the columns that should be leftmost, generates::

    CHeader BHeader AHeader DHeader
    c       b       a       d
    c       b       a       d

    </help>
    <citations>
        <citation type="bibtex">
            @ARTICLE{bgruening_galaxytools,
                Author = {Björn Grüning, Cameron Smith, Torsten Houwaart, Nicola Soranzo, Eric Rasche},
                keywords = {bioinformatics, ngs, galaxy, cheminformatics, rna},
                title = {{Galaxy Tools - A collection of bioinformatics and cheminformatics tools for the Galaxy environment}},
                url = {https://github.com/bgruening/galaxytools}
            }
        </citation>
    </citations>
</tool>