view column_remove_by_header.xml @ 1:2040e4c2750a draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/column_remove_by_header commit 6a87239f5139390963930673f36b869cde76fdf9
author iuc
date Sat, 16 Jul 2022 06:55:49 +0000
parents 372967836e98
children
line wrap: on
line source

<tool id="column_remove_by_header" name="Remove columns" version="1.0">
    <description>
        by heading
    </description>
    <requirements>
        <requirement type="package" version="3.10.4">python</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        python '$__tool_directory__/column_remove_by_header.py' -i '${input_tabular}' -o '${output_tabular}' -d '${input_tabular.unsanitized.metadata.delimiter}' ${keep_columns} -s '${strip_characters}' --unicode-escaped-cols
        --columns
        #for $header in $headers:
            '${header.name}'
        #end for
    ]]>
    </command>
    <inputs>
        <param name="input_tabular" type="data" format="tabular" multiple="False" optional="False" label="Tabular file"/>
        <repeat name="headers" title="Select Columns" min="1" default="1">
            <param name="name" type="text" optional="False" label="Header name">
                <sanitizer>
                    <valid initial="string.printable">
                        <remove value="&apos;"/>
                    </valid>
                    <mapping initial="none">
                        <add source="&apos;" target="&apos;&quot;&apos;&quot;&apos;"/>
                    </mapping>
                </sanitizer>
            </param>
        </repeat>
        <param name="keep_columns" type="boolean" truevalue="--keep" falsevalue="" checked="False" label="Keep named columns" help="When enabled revert the tool's action and drop all columns that are NOT selected above." />
        <param name="strip_characters" type="text" optional="False" label="Characters to strip when doing name comparison in first column" value="#" help="Removes characters from the left of the first column only.">
            <sanitizer>
                <valid initial="string.printable">
                    <remove value="&apos;"/>
                </valid>
                <mapping initial="none">
                    <add source="&apos;" target="&apos;&quot;&apos;&quot;&apos;"/>
                </mapping>
            </sanitizer>
        </param>
    </inputs>
    <outputs>
        <data format="tabular" name="output_tabular"/>
    </outputs>
    <tests>
        <test>
            <param name="input_tabular" value="in_1.tabular" ftype="tabular"/>
            <param name="name" value="a"/>
            <param name="name" value="\xf6"/>
            <param name="keep_columns" value="false"/>
            <param name="strip_characters" value="#"/>
            <output name="output_tabular" file="out_1.tabular" ftype="tabular"/>
        </test>
        <test>
            <param name="input_tabular" value="in_1.tabular" ftype="tabular"/>
            <param name="name" value="a"/>
            <param name="name" value="KEY"/>
            <param name="keep_columns" value="true"/>
            <param name="strip_characters" value="#"/>
            <output name="output_tabular" file="out_2.tabular" ftype="tabular"/>
        </test>
    </tests>
    <help><![CDATA[
Removes or keeps columns based upon user provided values.

Hint: If any of the column names you would like to specify contains special
(non-ASCII) characters, you can specify these using their Unicode escape
sequences.
    ]]></help>
    <citations>
    </citations>
</tool>