view catWrapper.xml @ 0:6f54dc6b37da draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/concat_multi_datasets commit 732cefeff9a38b50f23820441422d4df3974b922
author artbio
date Sun, 11 Mar 2018 18:19:40 -0400
parents
children 3a4694d4354f
line wrap: on
line source

<tool id="cat_multi_datasets" name="Concatenate multiple datasets" version="0.3">
    <description>tail-to-head</description>
    <command><![CDATA[
        #if $headers == "No":
            cat
            #for $file in $input
                "$file"
            #end for
            > "$out_file1"
        #else:
            #for $file in $input
                printf "# ${file.element_identifier}\n" >> "$out_file1" &&
                cat "$file" >> "$out_file1" &&
            #end for
            sleep 1
        #end if
        ]]>
    </command>
    <inputs>
        <param name="headers" type="select" label="include dataset names">
                <option value="No" selected="true">No</option>
                <option value="Yes">Yes</option>
        </param>
        <param name="input" type="data" label="Concatenate Dataset" multiple="True"/>
    </inputs>
    <outputs>
        <data name="out_file1" format_source="input" metadata_source="input"/>
    </outputs>
    <tests>
        <test>
            <param name="headers" value="No" />
            <param name="input" value="1.bed,2.bed"/>
            <output name="out_file1" file="cat_wrapper_out1.bed"/>
        </test>
        <test>
            <param name="headers" value="Yes" />
            <param name="input" value="1.bed,2.bed"/>
            <output name="out_file1" file="cat_wrapper_out2.bed"/>
        </test>

    </tests>
    <help>

.. class:: warningmark

**WARNING:** This tool does not check if the datasets being concatenated are in the same format.

-----

**What it does**

Concatenates datasets

-----

**Example**

Concatenating Dataset::

    chrX  151087187  151087355  A  0  -
    chrX  151572400  151572481  B  0  +

with Dataset1::

    chr1  151242630  151242955  X  0  +
    chr1  151271715  151271999  Y  0  +
    chr1  151278832  151279227  Z  0  -

and with Dataset2::

    chr2  100000030  200000955  P  0  +
    chr2  100000015  200000999  Q  0  +

will result in the following::

    chrX  151087187  151087355  A  0  -
    chrX  151572400  151572481  B  0  +
    chr1  151242630  151242955  X  0  +
    chr1  151271715  151271999  Y  0  +
    chr1  151278832  151279227  Z  0  -
    chr2  100000030  200000955  P  0  +
    chr2  100000015  200000999  Q  0  +

-----

Adapted from galaxy's catWrapper.xml to allow multiple input files.

    </help>
</tool>