view head.xml @ 1:a4ad586d1403 draft

Uploaded
author bgruening
date Thu, 05 Sep 2013 11:42:27 -0400
parents ec66f9d90ef0
children 7068d1548234
line wrap: on
line source

<tool id="unixtools_head_tool" name="Select first" version="0.1.1">
    <description>lines from a dataset (head)</description>
    <requirements>
        <requirement type="package" version="8.21">gnu_coreutils</requirement>
    </requirements>
    <command>
        head --lines $complement$count '${infile}' &gt; '${outfile}'
    </command>

    <inputs>
        <param format="txt" name="infile" type="data" 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').">
            <sanitizer>
                <valid initial="string.printable">
                    <remove value="&apos;"/>
                </valid>
            </sanitizer>
        </param>
    </inputs>

    <outputs>
        <data format="input" name="outfile" metadata_source="infile"/>
    </outputs>
    <tests>
        <test>
            <param name="count" value="10"/>
            <param name="infile" value="1.bed"/>
            <output name="out_file1" file="eq-showbeginning.dat"/>
        </test>
    </tests>
    <help>

**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  +


    </help>
</tool>