view get.communitytype.xml @ 5:beb4e0832f3b draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 7f7605c2c8d8e92f3369dfdc290e5d8d06fa409a
author iuc
date Fri, 03 Aug 2018 14:27:47 -0400
parents 92b64ed4e08b
children
line wrap: on
line source

<tool profile="16.07" id="mothur_get_communitytype" name="Get.communitytype" version="@WRAPPER_VERSION@.0">
    <description>description</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 '$otu' shared.dat &&

echo 'get.communitytype(
    shared=shared.dat,
    #if $label:
        label=${ str($label).replace(",","-") },
    #end if
    #if $groups:
        groups=${ str($groups).replace(",","-") },
    #end if
    method=$m.method,
    #if $m.method == 'kmeans' or $m.method == 'pams':
        calc=$m.calc,
        iters=$m.iters,
    #end if
    #if int($subsample) == 0:
        subsample=T,
    #elif int($subsample) > 0:
        subsample=$subsample,
    #end if
    minpartitions=$minpartitions,
    maxpartitions=$maxpartitions,
    optimizegap=$optimizegap,
    processors='\${GALAXY_SLOTS:-8}'
)'
| sed 's/ //g'  ## mothur trips over whitespace
| mothur
| tee mothur.out.log
    ]]></command>
    <inputs>
        <param name="otu" type="data" format="mothur.shared" label="shared - Shared file"/>
        <param name="label" type="select" label="label - OTU Labels" multiple="true" optional="true">
            <expand macro="labeloptions"/>
        </param>
        <param name="groups" type="select" label="groups - Groups to consider" multiple="true" optional="true">
            <options>
                <filter type="data_meta" ref="otu" key="groups"/>
            </options>
        </param>
        <conditional name="m">
            <param name="method" type="select" label="method">
                <option value="dmm" selected="true">dmm</option>
                <option value="kmeans">k means</option>
                <option value="pam">pam</option>
            </param>
            <when value="dmm"/>
            <when value="kmeans">
                <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)">
                    <expand macro="calc-common"/>
                    <!-- set default option(s) -->
                    <option value="rjsd" selected="true">rjsd</option>
                </param>
                <param name="iters" type="integer" optional="true" value="" min="0" label="iters - number of iterations" help=""/>
            </when>
            <when value="pam">
                <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)">
                    <expand macro="calc-common"/>
                    <!-- set default option -->
                    <option value="rjsd" selected="true">rjsd</option>
                </param>
                <param name="iters" type="integer" optional="true" value="" min="0" label="iters - number of iterations" help=""/>
            </when>
        </conditional>
        <param name="minpartitions" type="integer" value="5" min="0" label="minpartitions" help=""/>
        <param name="maxpartitions" type="integer" value="10" min="0" label="minpartitions" help=""/>
        <param name="optimizegap" type="integer" value="3" min="0" label="minpartitions" help=""/>
        <param name="subsample" type="integer" value="-1" min="-1" label="subsample" help="Ignored if negative, when set to 0 it uses the size of your smallest group (subsample=T)"/>
        <expand macro="param-savelog"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="summary" format="tabular" from_work_dir="shared*.summary" label="${tool.name} on ${on_string}: summary">
            <filter> m['method'] == 'dmm' </filter>
        </data>
        <data name="design" format="tabular" from_work_dir="shared*.design" label="${tool.name} on ${on_string}: design"/>
        <data name="parameters" format="tabular" from_work_dir="shared*.parameters" label="${tool.name} on ${on_string}: parameters">
            <filter> m['method'] == 'dmm' </filter>
        </data>
        <data name="fit" format="tabular" from_work_dir="shared*.fit" label="${tool.name} on ${on_string}: fit"/>
        <collection name="relabund" type="list" label="${tool.name} on ${on_string}: relabund">
            <discover_datasets pattern="shared\.(?P&lt;designation&gt;.*)\.relabund" format="mothur.relabund"/>
        </collection>
        <collection name="posterior" type="list" label="${tool.name} on ${on_string}: posterior">
            <discover_datasets pattern="shared\.(?P&lt;designation&gt;.*)\.posterior" format="tabular"/>
        </collection>
    </outputs>
    <tests>
        <test><!-- test with defaults -->
            <param name="otu" value="final.tx.1.subsample.1.pick.shared"/>
            <output name="summary" md5="3e81c01da5f6c86b69516e204ad51610" ftype="tabular"/>
            <output name="design" md5="df00e5ea21154669bbb85efa20a9661d" ftype="tabular"/>
            <output name="parameters" md5="ef972523811b80b12d4343f0df472214" ftype="tabular"/>
            <output name="fit" ftype="tabular">
                <assert_contents>
                    <has_line_matching expression="K\tNLE\tlogDet\tBIC\tAIC\tLaplace"/>
                </assert_contents>
            </output>
            <output_collection name="relabund" count="5">
                <element name="1.dmm.1.mix" md5="9c338b1fb5aea4baae2dbf242331d27c" ftype="mothur.relabund"/>
            </output_collection>
            <output_collection name="posterior" count="5">
                <element name="1.dmm.1.mix" md5="fae04096d53d6980d8eb712e6ec8b0d2" ftype="tabular"/>
            </output_collection>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with all settings -->
            <param name="otu" value="final.tx.1.subsample.1.pick.shared" ftype="mothur.shared"/>
            <param name="label" value="1"/>
            <param name="groups" value="F003D000,F003D002,F003D006,F003D008,F003D142"/>
            <param name="method" value="kmeans"/>
            <param name="iters" value="100"/>
            <param name="calc" value="manhattan"/>
            <param name="maxpartitions" value="4"/>
            <param name="subsample" value="0"/>
            <output name="design" ftype="tabular">
                <assert_contents>
                    <has_text text="Partition_"/>
                    <has_text text="F003D000"/>
                    <has_text text="F003D142"/>
                </assert_contents>
            </output>
            <output name="fit" ftype="tabular">
                <assert_contents>
                    <has_line_matching expression="K\tCH\tF003D000\tF003D002\tF003D006\tF003D008\tF003D142"/>
                </assert_contents>
            </output>
            <output_collection name="relabund" count="4">
                <element name="1.kmeans.1.mix" md5="514780678b8d9413566df3355d427e27" ftype="mothur.relabund"/>
            </output_collection>
            <output_collection name="posterior" count="4">
                <element name="1.kmeans.1.mix" md5="43f4dfc2bcd1cf20db4f89ee90b6041c" ftype="tabular"/>
            </output_collection>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help><![CDATA[
@MOTHUR_OVERVIEW@


**Command Documentation**


.. _get.communitytype: https://www.mothur.org/wiki/Get.communitytype
    ]]></help>
    <expand macro="citations">
        <citation type="doi">10.1371/journal.pone.0030126</citation>
    </expand>
</tool>