view head.xml @ 6:60edf2f8c28f draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b'e6ee273f75fff61d1e419283fa8088528cf59470\n'
author bgruening
date Sat, 06 May 2017 13:09:05 -0400
parents 37e1eb05b1b4
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>