view libshuff.xml @ 1:6050c5fade6a 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:05:02 -0400
parents 590cb2451872
children ffe8649e5434
line wrap: on
line source

<tool profile="16.07" id="mothur_libshuff" name="Libshuff" version="@WRAPPER_VERSION@.0">
    <description>Cramer-von Mises tests communities for the same structure</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 "$dist" dist.dat &&
        ln -s "$group" group.dat &&

        echo 'libshuff(
            phylip=dist.dat,
            group=group.dat,
            #if $groups:
                groups=${ str($groups).replace(",","-") },
            #end if
            sim=$sim,
            #if $form.form2 == "discrete":
                step=$form.step,
                #if $form.cutoff:
                    cutoff=$form.cutoff,
                #end if
            #end if
            iters=$iters
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur
        | tee mothur.out.log
    ]]></command>
    <inputs>
        <param name="dist" type="data" format="mothur.lower.dist,mothur.square.dist" label="phylip - Distance Matrix"/>
        <param name="group" type="data" format="mothur.groups" label="group - Groups"/>
        <param name="groups" type="select" multiple="true" label="groups - Groups to condider">
            <options>
                <filter type="data_meta" ref="group" key="groups"/>
            </options>
        </param>
        <param name="iters" type="integer" value="10000" label="iters - Number of iterations to try (default 10000)"/>
        <param name="sim" type="boolean" checked="false" truevalue="true" falsevalue="false" label="sim - Matrix values are Similary instead of Distance"/>
        <conditional name="form">
            <param name="form2" type="select" label="form - Select a Clustering Method" help="">
                <option value="integral" selected="true">Integral</option>
                <option value="discrete">Discrete</option>
            </param>
            <when value="integral"/>
            <when value="discrete">
                <param name="step" type="float" value="0.10" min="0.0" max="1.0" label="step - Step size - ignored if not > 0" help="default value 0.10, smaller steps approach integral"/>
                <param name="cutoff" type="float" value="" optional="true" min="0.0" max="1.0" label="cutoff - Cutoff threshold - ignored if left empty"/>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="summary" format="tabular" from_work_dir="dist*.summary" label="${tool.name} on ${on_string}: summary"/>
        <data name="coverage" format="tabular" from_work_dir="dist*.coverage" label="${tool.name} on ${on_string}: coverage"/>
    </outputs>
    <tests>
        <test>
            <param name="dist" value="amazon.dist" ftype="mothur.dist"/>
            <param name="group" value="amazon.groups" ftype="mothur.groups"/>
            <output name="summary">
                <assert_contents>
                    <has_text text="forest-pasture"/>
                    <has_text text="pasture-forest"/>
                </assert_contents>
            </output>
            <output name="coverage">
                <assert_contents>
                    <has_text text="dist"/>
                    <has_text text="forest-pasture"/>
                    <has_text text="pasture-forest"/>
                </assert_contents>
            </output>
            <expand macro="logfile-test"/>
        </test>
        <test>
            <param name="dist" value="amazon.dist" ftype="mothur.dist"/>
            <param name="group" value="amazon.groups" ftype="mothur.groups"/>
            <param name="groups" value="forest,pasture"/>
            <param name="form2" value="discrete"/>
            <param name="step" value="0.25"/>
            <param name="cutoff" value="0.25"/>
            <output name="summary">
                <assert_contents>
                    <has_text text="forest-pasture"/>
                    <has_text text="pasture-forest"/>
                </assert_contents>
            </output>
            <output name="coverage">
                <assert_contents>
                    <has_text text="dist"/>
                    <has_text text="forest-pasture"/>
                    <has_text text="pasture-forest"/>
                </assert_contents>
            </output>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@


**Command Documentation**

The libshuff_ method is a generic test that describes whether two or more communities have the same structure using the Cramer-von Mises test statistic. The significance of the test statistic indicates the probability that the communities have the same structure by chance. Because each pairwise comparison requires two significance tests, a correction for multiple comparisons (e.g. Bonferroni's correction) must be applied.

.. _libshuff: https://www.mothur.org/wiki/Libshuff

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