view split.groups.xml @ 1:addf3c859349 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 721531d2e9fd1e208a3fba8cfbe5dcd572599ca2
author iuc
date Tue, 05 Sep 2017 17:02:15 -0400
parents dba66f208b1a
children 5f34cf40f36d
line wrap: on
line source

<tool profile="16.07" id="mothur_split_groups" name="Split.groups" version="@WRAPPER_VERSION@.0">
    <description>Generates a fasta file for each group</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <expand macro="version_command"/>
    <command><![CDATA[
        @SHELL_OPTIONS@

        ## create symlinks to input datasets
        ln -s "$name" name.dat &&
        ln -s "$count" count.dat &&
        ln -s "$fasta" fasta.dat &&
        ln -s "$group" group.dat &&

        echo 'split.groups(
            #if $name:
                name=name.dat,
            #end if
            #if $groups:
                groups=${ str($groups).replace(",","-") },
            #end if
            #if $count:
                count=count.dat,
            #end if
            fasta=fasta.dat,
            group=group.dat
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur
        | tee mothur.out.log
    ]]></command>
    <inputs>
        <param name="fasta" type="data" format="fasta" label="fasta - Fasta to split by group"/>
        <param name="name" type="data" format="mothur.names" label="name - Names to split by group" optional="true"/>
        <param name="group" type="data" format="mothur.groups" label="group - Groups"/>
        <param name="groups" type="select" optional="true" label="groups - Pick groups to analyze" multiple="true">
            <options>
                <filter type="data_meta" ref="group" key="groups"/>
            </options>
        </param>
        <param name="count" type="data" format="mothur.count_table" optional="true" label="count - a count_table" help="generated by count.seqs"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <collection name="groupfastas" type="list" label="${tool.name} on ${on_string}: fasta per group">
            <!-- TODO: format_source on discovered collection elements doesn't seem to work yet, change to format_source="fasta" once it does -->
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.fasta" format="fasta"/>
        </collection>
    </outputs>
    <tests>
        <test>
            <param name="fasta" value="amazon.fasta" ftype="fasta"/>
            <param name="group" value="amazon.groups" ftype="mothur.groups"/>
            <output_collection name="groupfastas" count="2">
                <element name="pasture" md5="3844bc02ec09acbbf31845ea6ac6632d" ftype="fasta"/>
                <element name="forest" md5="f0e662d1d82e96b4977864925493dbf5" ftype="fasta"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The split.groups_ command reads a fasta file and group_ file and generates a fasta file for each group in the groupfile.  A name_ file can also be split into groups.

.. _group: https://www.mothur.org/wiki/Group_file
.. _name: https://www.mothur.org/wiki/Name_file
.. _split.groups: https://www.mothur.org/wiki/Split.groups
]]>
    </help>
    <expand macro="citations"/>
</tool>