view head.xml @ 8:4c752559b236 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 3103ebed1a420c7d3415b67ef532ea579edf9faa
author bgruening
date Wed, 12 Jul 2017 14:07:57 -0400
parents 60edf2f8c28f
children 12615d397df7
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" 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>
    <expand macro="citations" />
</tool>