view get.groups.xml @ 8:dd84e5f5eeaa draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 4c950508328589b5215b6c96868659a03f9dead8"
author iuc
date Tue, 08 Dec 2020 13:33:24 +0000
parents 1715be05e718
children
line wrap: on
line source

<tool profile="16.07" id="mothur_get_groups" name="Get.groups" version="@WRAPPER_VERSION@.0">
    <description>Select groups</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 '$group_in' group_in.dat &&
ln -s '$fasta_in' fasta_in.dat &&
ln -s '$name_in' name_in.dat &&
ln -s '$list_in' list_in.dat &&
ln -s '$shared_in' shared_in.dat &&
ln -s '$taxonomy_in' taxonomy_in.dat &&
ln -s '$design_in' design_in.dat &&
ln -s '$column_in' column_in.dat &&
ln -s '$phylip_in' phylip_in.dat &&
#if $groupnames.source == 'accnos':
    ln -s '$groupnames.accnos' groupnames.accnos.dat &&
#end if

echo 'get.groups(
    #if $group_in.is_of_type("mothur.groups"):
        group=group_in.dat
    #else
        count=group_in.dat
    #end if
    #if $groupnames.source == 'groups':
        #if $groupnames.groups:
            ,groups=${ str($groupnames.groups).replace(",","-") }
        #end if
    #else
        ,accnos=groupnames.accnos.dat
    #end if
    #if $fasta_in:
        ,fasta=fasta_in.dat
    #end if
    #if $name_in:
        ,name=name_in.dat
    #end if
    #if $list_in:
        ,list=list_in.dat
    #end if
    #if $shared_in:
        ,shared=shared_in.dat
    #end if
    #if $taxonomy_in:
        ,taxonomy=taxonomy_in.dat
    #end if
    #if $design_in:
        ,design=design_in.dat
    #end if
    #if $column_in:
        ,column=column_in.dat
    #end if
    #if $phylip_in:
        ,phylip=phylip_in.dat
    #end if
)'
| sed 's/ //g'  ## mothur trips over whitespace
| mothur
| tee mothur.out.log
    ]]></command>
    <inputs>
        <param name="group_in" type="data" format="mothur.groups,mothur.count_table" optional="true" label="group or count_table file"/>
        <param name="shared_in" type="data" format="mothur.shared" optional="true" label="shared - OTU Shared"/>
        <param name="design_in" type="data" format="tabular" optional="true" label="design - assign groups to new grouping"
            help="design has 2 columns: group(col 1) and grouping(col 2) (separated by a TAB character) use make.design"/>
        <conditional name="groupnames">
            <param name="source" type="select" label="Select Group Names from">
                <option value="groups">A List of Group Names</option>
                <option value="accnos">A History Group Name Accnos Dataset</option>
            </param>
            <when value="groups">
                <param name="groups" type="select" multiple="true" label="groups - Pick groups to include">
                    <options>
                        <filter type="data_meta" ref="group_in" key="groups"/>
                    </options>
                </param>
            </when>
            <when value="accnos">
                <param name="accnos" type="data" format="mothur.accnos" label="accnos - Group Names from your history"/>
            </when>
        </conditional>
        <param name="fasta_in" type="data" format="fasta,mothur.align" 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"/>
        <param name="phylip_in" type="data" format="mothur.lower.dist,mothur.square.dist" optional="true" label="phylip - Distance Matrix you would like to select distances from"
            help="must be a phylip-formatted distance matrix"/>
        <param name="column_in" type="data" format="mothur.pair.dist" optional="true" label="column - Distance Matrix you would like to select distances from"
            help="must be a column-formatted distance matrix"/>
        <expand macro="param-savelog"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="group_out" format="mothur.groups" from_work_dir="group_in*.pick.*" label="${tool.name} on ${on_string}: pick.groups">
            <filter>group_in.ext == "mothur.groups"</filter>
        </data>
        <data name="count_out" format="mothur.count_table" from_work_dir="group_in*.pick.*" label="${tool.name} on ${on_string}: pick.count_table">
            <filter>group_in.ext == "mothur.count_table"</filter>
        </data>
        <data name="fasta_out" format_source="fasta_in" from_work_dir="fasta_in*.pick.*" label="${tool.name} on ${on_string}: pick.fasta">
            <filter>fasta_in</filter>
        </data>
        <data name="name_out" format="mothur.names" from_work_dir="name_in*.pick.*" label="${tool.name} on ${on_string}: pick.name">
            <filter>name_in</filter>
        </data>
        <collection name="listfiles" type="list" label="${tool.name} on ${on_string}: pick.list">
            <filter>list_in</filter>
            <discover_datasets pattern="list_in.*?\.(?P&lt;designation&gt;.*)\.pick\.dat" format="mothur.list"/>
        </collection>
        <collection name="sharedfiles" type="list" label="${tool.name} on ${on_string}: pick.shared">
            <filter>shared_in</filter>
            <discover_datasets pattern="shared_in.*?\.(?P&lt;designation&gt;.*)\.pick\.dat" format="mothur.shared"/>
        </collection>
        <data name="taxonomy_out" format="mothur.seq.taxonomy" from_work_dir="taxonomy_in*.pick.*" label="${tool.name} on ${on_string}: pick.taxonomy">
            <filter>taxonomy_in</filter>
        </data>
        <data name="design_out" format="mothur.design" from_work_dir="design_in*.pick.*" label="${tool.name} on ${on_string}: pick.design">
            <filter>design_in</filter>
        </data>
        <data name="phylip_out" format_source="phylip_in" from_work_dir="phylip_in*.pick.*" label="${tool.name} on ${on_string}: pick.phylip">
            <filter>phylip_in</filter>
        </data>
        <data name="column_out" format="mothur.pair.dist" from_work_dir="column_in*.pick.*" label="${tool.name} on ${on_string}: pick.column">
            <filter>column_in</filter>
        </data>
    </outputs>
    <tests>
        <test><!-- test with group file -->
            <param name="group_in" value="amazon.groups" ftype="mothur.groups"/>
            <param name="source" value="groups"/>
            <param name="groups" value="forest,pasture"/>
            <output name="group_out" md5="fb60628ae445e7b06f9833f632b2cd0c" ftype="mothur.groups"/>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with accnos file -->
            <param name="group_in" value="amazon.groups" ftype="mothur.groups"/>
            <param name="source" value="accnos"/>
            <param name="accnos" value="amazon.groupaccnos" ftype="mothur.accnos"/>
            <output name="group_out" md5="fb60628ae445e7b06f9833f632b2cd0c" ftype="mothur.groups"/>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with accnos file and most extra files-->
            <param name="group_in" value="amazon.groups" ftype="mothur.groups"/>
            <param name="source" value="accnos"/>
            <param name="accnos" value="amazon.groupaccnos" ftype="mothur.accnos"/>
            <param name="fasta_in" value="amazon.fasta" ftype="fasta"/>
            <param name="name_in" value="amazon1.names" ftype="mothur.names"/>
            <param name="list_in" value="amazon.an.list" ftype="mothur.list"/>
            <param name="shared_in" value="amazon.an.shared" ftype="mothur.shared"/>
            <output name="group_out" md5="fb60628ae445e7b06f9833f632b2cd0c" ftype="mothur.groups"/>
            <output name="fasta_out" md5="0bc9320647234e8367c3b1b654f9302d" ftype="fasta"/>
            <output name="name_out" md5="1f0324a017e1b71e6ed0af257b0013f3" ftype="mothur.names"/>
            <output_collection name="listfiles" count="36">
                <element name="0.38" md5="49878dfbe53d5144f3bd885c629de822" ftype="mothur.list"/>
            </output_collection>
            <output_collection name="sharedfiles" count="36">
                <element name="0.38" md5="3c78742e0a480ca3353f9b591fc9bf36" ftype="mothur.shared"/>
            </output_collection>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with distance matrix -->
            <param name="group_in" value="amazon_withgroups.count_table" ftype="mothur.count_table"/>
            <param name="source" value="accnos"/>
            <param name="accnos" value="amazon.groupaccnos" ftype="mothur.accnos"/>
            <param name="column_in" value="amazon.pair.dist" ftype="mothur.pair.dist"/>
            <param name="phylip_in" value="amazon.dist" ftype="mothur.square.dist"/>
            <output name="column_out" ftype="mothur.pair.dist">
                <assert_contents>
                    <expand macro="test-column-format"/>
                    <has_text text="U68589"/>
                </assert_contents>
            </output>
            <output name="phylip_out" ftype="mothur.square.dist">
                <assert_contents>
                    <expand macro="test-dist-format"/>
                    <has_text text="U68589"/>
                </assert_contents>
            </output>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help><![CDATA[

@MOTHUR_OVERVIEW@


**Command Documentation**

The get.groups_ command selects sequences from a specific group or set of groups from the following file types: fasta, 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
.. _get.groups: https://www.mothur.org/wiki/Get.groups

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