view head.xml @ 1:43b1f073b693 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 369e40078146d00608d52205bb8cee66ae735b76-dirty
author bgruening
date Tue, 30 Jun 2015 16:23:23 -0400
parents 5314e5d6f040
children 37e1eb05b1b4
line wrap: on
line source

<tool id="tp_head_tool" name="Select first" version="@BASE_VERSION@.0">
    <description>lines from a dataset (head)</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <version_command>head --version | head -n 1</version_command>
    <command>
<![CDATA[
        head
            --lines
            $complement$count
            '${infile}'
            > '${outfile}'
]]>
    </command>
    <inputs>
        <param name="infile" type="data" format="txt" label="File to select" />
        <param name="complement" type="select" label="Operation">
            <option value="">Keep first lines</option>
            <option value="-">Remove last lines</option>
        </param>
        <param name="count" type="integer" size="5" value="10"
            label="Number of lines" help="These will be kept/discarded depending on 'operation'. (--lines)" />
    </inputs>
    <outputs>
        <data name="outfile" format_source="infile" metadata_source="infile"/>
    </outputs>
    <tests>
        <test>
            <param name="count" value="10"/>
            <param name="infile" value="1.bed"/>
            <output name="outfile" file="head_results1.bed"/>
        </test>
    </tests>
    <help>
<![CDATA[
**What it does**

This tool outputs specified number of lines from the **beginning** of a dataset

-----

**Example**

Selecting 2 lines from this::

    chr7  56632  56652  D17003_CTCF_R6  310  +
    chr7  56736  56756  D17003_CTCF_R7  354  +
    chr7  56761  56781  D17003_CTCF_R4  220  +
    chr7  56772  56792  D17003_CTCF_R7  372  +
    chr7  56775  56795  D17003_CTCF_R4  207  +

will produce::

    chr7  56632  56652  D17003_CTCF_R6  310  +
    chr7  56736  56756  D17003_CTCF_R7  354  +

@REFERENCES@
]]>
    </help>
</tool>