view remove.groups.xml @ 1:bbef0f523231 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:14:30 -0400
parents e7a69b6134c5
children 75433aae83fb
line wrap: on
line source

<tool profile="16.07" id="mothur_remove_groups" name="Remove.groups" version="@WRAPPER_VERSION@.0">
    <description>Remove groups from groups,fasta,names,list,taxonomy</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
        #if $groupnames.source == "other":
            ln -s "$groupnames.group_in" groupnames_group_in.dat &&
            ln -s "$groupnames.fasta_in" groupnames_fasta_in.dat &&
            ln -s "$groupnames.name_in" groupnames_name_in.dat &&
            ln -s "$groupnames.list_in" groupnames_list_in.dat &&
            ln -s "$groupnames.taxonomy_in" groupnames_taxonomy_in.dat &&
        #else
            ln -s "$groupnames.shared_in" groupnames_shared_in.dat &&
        #end if

        echo 'remove.groups(
            #if $groupnames.source == "other":
                #if $group_in.is_of_type("mothur.groups"):
                    group=groupnames_group_in.dat
                #else
                    count=groupnames_group_in.dat
                #end if
                #if $groupnames.fasta_in:
                    ,fasta=groupnames_fasta_in.dat
                #end if
                #if $groupnames.name_in:
                    ,name=groupnames_name_in.dat
                #end if
                #if $groupnames.list_in:
                    ,list=groupnames_list_in.dat
                #end if
                #if $groupnames.taxonomy_in:
                    ,taxonomy=groupnames_taxonomy_in.dat
                #end if
            #else
                shared=groupnames_shared_in.dat
            #end if
            ,groups=${ str($groupnames.groups).replace(",","-") }
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur
        | tee mothur.out.log
    ]]></command>
    <inputs>
        <conditional name="groupnames">
            <param name="source" type="select" label="Select Input Type">
                <option value="shared">shared file</option>
                <option value="other">fasta, name, taxonomy, or list with a group file or count table</option>
            </param>
            <when value="other">
                <param name="group_in" type="data" format="mothur.groups,mothur.count_table" label="group or count table - Groups"/>
                <param name="groups" type="select" label="groups - Pick groups to remove" multiple="true" optional="false">
                    <options>
                        <filter type="data_meta" ref="group_in" key="groups"/>
                    </options>
                </param>
                <param name="fasta_in" type="data" format="mothur.align,fasta" optional="true" label="fasta - Fasta Sequences"/>
                <param name="name_in" type="data" format="mothur.names" optional="true" label="name - Sequences Name reference"/>
                <param name="list_in" type="data" format="mothur.list" optional="true" label="list - OTU List"/>
                <param name="taxonomy_in" type="data" format="mothur.seq.taxonomy" optional="true" label="taxonomy - Taxonomy"/>
            </when>
            <when value="shared">
                <param name="shared_in" type="data" format="mothur.shared" optional="true" label="shared - OTU Shared"/>
                <param name="groups" type="select" label="groups - Pick groups to remove" multiple="true" optional="false">
                    <options>
                        <filter type="data_meta" ref="shared_in" key="groups"/>
                    </options>
                </param>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="fasta_out" format_source="fasta_in" from_work_dir="groupnames_fasta_in*.pick.*" label="${tool.name} on ${on_string}: pick.fasta">
            <filter>groupnames['source'] == 'other' and groupnames['fasta_in']</filter>
        </data>
        <data name="group_out" format="mothur.groups" from_work_dir="groupnames_group_in*.pick.*" label="${tool.name} on ${on_string}: pick.groups">
            <filter>groupnames['source'] == 'other' and groupnames['group_in'].ext == 'mothur.groups'</filter>
        </data>
        <data name="count_out" format="mothur.count_table" from_work_dir="groupnames_group_in*.pick.*" label="${tool.name} on ${on_string}: pick.count_table">
            <filter>groupnames['source'] == 'other' and groupnames['group_in'].ext == 'mothur.count_table'</filter>
        </data>
        <data name="name_out" format="mothur.names" from_work_dir="groupnames_name_in*.pick.*" label="${tool.name} on ${on_string}: pick.names">
            <filter>groupnames['source'] == 'other' and groupnames['name_in']</filter>
        </data>
        <data name="taxonomy_out" format="mothur.seq.taxonomy" from_work_dir="groupnames_taxonomy_in*.pick.*" label="${tool.name} on ${on_string}: pick.taxonomy">
            <filter>groupnames['source'] == 'other' and groupnames['taxonomy_in']</filter>
        </data>
        <collection name="list_out" type="list" label="${tool.name} on ${on_string}: pick.list">
            <filter>groupnames['source'] == 'other' and groupnames['list_in']</filter>
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.pick\.dat" format="mothur.list"/>
        </collection>
        <collection name="shared_out" type="list" label="${tool.name} on ${on_string}: pick.shared">
            <filter>groupnames['source'] == 'shared'</filter>
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.pick\.dat" format="mothur.shared"/>
        </collection>
    </outputs>
    <tests>
        <test><!-- test with shared file -->
            <param name="source" value="shared"/>
            <param name="shared_in" value="amazon.an.shared"/>
            <param name="groups" value="pasture"/>
            <output_collection name="shared_out" count="36">
                <element name="0.26" md5="c5043237225f0292ce1bfbd2766b96ea" ftype="mothur.shared"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with group file and fasta/names/list/taxonomy files -->
            <param name="source" value="other"/>
            <param name="group_in" value="amazon.groups" ftype="mothur.groups"/>
            <param name="fasta_in" value="amazon.fasta" ftype="fasta"/>
            <param name="name_in" value="amazon.names" ftype="mothur.names"/>
            <param name="list_in" value="amazon.an.list" ftype="mothur.list"/>
            <param name="taxonomy_in" value="amazon.wang.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
            <param name="groups" value="pasture"/>
            <output name="fasta_out" md5="f0e662d1d82e96b4977864925493dbf5" ftype="fasta"/>
            <output name="taxonomy_out" md5="8fcaadcb5ad40873e270ad7e2cebe7fa" ftype="mothur.seq.taxonomy"/>
            <output name="group_out" md5="6d689ead98f3eb1af41f1a78386d0b50" ftype="mothur.groups"/>
            <output name="name_out" md5="55dbcadbb414d95bae8a282a93c10e63" ftype="mothur.names"/>
            <output_collection name="list_out" count="36">
                <element name="0.26" md5="71282909924de5f43452f1a5dbf623e8" ftype="mothur.list"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help><![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The remove.groups_ command removes sequences from a specific group or set of groups from the following file types: fasta, name_, group_, list_, taxonomy_.

.. _name: https://www.mothur.org/wiki/Name_file
.. _group: https://www.mothur.org/wiki/Group_file
.. _list: https://www.mothur.org/wiki/List_file
.. _taxonomy: https://www.mothur.org/wiki/Taxonomy_outline
.. _remove.groups: https://www.mothur.org/wiki/Remove.groups

]]>
    </help>
    <expand macro="citations"/>
</tool>