view summary.single.xml @ 0:b0c7113ee948 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit a9d1e0debcd357d8080a1c6c5f1d206dd45a7a4d
author iuc
date Fri, 19 May 2017 05:53:46 -0400
parents
children 9ea778acd657
line wrap: on
line source

<tool profile="16.07" id="mothur_summary_single" name="Summary.single" version="@WRAPPER_VERSION@.0">
    <description>Summary of calculator values for OTUs</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" otu.dat &&

        echo 'summary.single(
            #if $otu.is_of_type("mothur.rabund"):
                rabund=otu.dat
            #elif $otu.is_of_type("mothur.sabund"):
                sabund=otu.dat
            #elif $otu.is_of_type("mothur.list"):
                list=otu.dat
            #elif $otu.is_of_type("mothur.shared"):
                shared=otu.dat,
                groupmode=$groupmode
            #end if
            #if $label:
                ,label=${ str($label).replace(",","-") }
            #end if
            #if $calc:
                ,calc=${ str($calc).replace(",","-") }
            #end if
            #if $abund:
                ,abund=$abund
            #end if
            #if $size:
                ,size=$size
            #end if
            #if $subsample.use == 'yes':
                #if $subsample.subsample:
                    ,subsample=$subsample.subsample
                #else
                    ,subsample=T
                #end if
                #if $subsample.iters:
                    ,iters=$subsample.iters
                #end if
            #end if
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur
        | tee mothur.out.log
        #if $subsample.use == 'yes' and not ($otu.extension == 'mothur.shared' and not $groupmode):
            && mv otu.ave-std.summary otu.ave-std
        #end if
    ]]></command>
    <inputs>
        <param name="otu" type="data" format="mothur.list,mothur.rabund,mothur.sabund,mothur.shared" label="list,rabund,sabund,shared - OTU List"/>
        <param name="label" type="select" label="label - OTU Labels" multiple="true">
            <expand macro="labeloptions"/>
        </param>
        <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
            <option value="ace" selected="true">ace - Community richness the ACE estimator</option>
            <option value="bootstrap">bootstrap - Community richness the bootstrap estimator</option>
            <option value="chao" selected="true">chao - Community richness the Chao1 estimator</option>
            <option value="jack" selected="true">jack - Community richness the jackknife estimator</option>
            <option value="sobs" selected="true">sobs - Community richness the observed richness</option>
            <option value="simpsoneven">simpsoneven - Community evenness a Simpson index-based measure of evenness</option>
            <option value="shannoneven">shannoneven - Community evenness a Shannon index-based measure of evenness</option>
            <option value="heip">heip - Community evenness Heip's metric of community evenness</option>
            <option value="smithwilson">smithwilson - Community evenness Smith and Wilson's metric of community evenness</option>
            <option value="bergerparker">bergerparker - Community diversity the Berger-Parker index</option>
            <option value="coverage">coverage - Community diversity the sampling coverage </option>
            <option value="goodscoverage">goodscoverage - Community diversity the Good's estimate of sampling coverage </option>
            <option value="simpson" selected="true">simpson - Community diversity the Simpson index</option>
            <option value="invsimpson">invsimpson - Community diversity the Simpson index</option>
            <option value="qstat">qstat - Community diversity the Q statistic</option>
            <option value="shannon" selected="true">shannon - Community diversity the Shannon index</option>
            <option value="npshannon" selected="true">npshannon - Community diversity the non-parametric Shannon index</option>
            <option value="boneh">boneh - Estimator Boneh's estimator</option>
            <option value="efron">efron - Estimator Efron's estimator</option>
            <option value="shen">shen - Estimator Shen's estimator</option>
            <option value="solow">solow - Estimator Solow's estimator</option>
            <option value="logseries">logseries - Statistical distribution tests whether observed data follow the log series distribution</option>
            <option value="geometric">geometric - Statistical distribution tests whether observed data follow the geometric series distribution</option>
            <option value="bstick">bstick - Statistical distribution tests whether observed data follow the broken stick distribution</option>
            <option value="nseqs">nseqs - Utility the number of sequences in a sample</option>
        </param>
        <param name="abund" type="integer" min="0" value="10" label="abund - ACE Estimator threshold for abundant versus rare OTUs"/>
        <param name="size" type="integer" optional="true" value="" min="1" label="size - enter the size of the sample, if not set mothur will use the size of your smallest group"/>
        <conditional name="subsample">
            <param name="use" type="select" label="produce subsample distance matrices">
                <option value="no" selected="true">no</option>
                <option value="yes">yes</option>
            </param>
            <when value="yes">
                <param name="subsample" type="integer" value="" optional="true" label="subsample - size of the sample" help="If using shared input: may be left blank to use the size of your smallest group"/>
                <param name="iters" type="integer" value="0" optional="true" label="iters - Number of times to run the subsample"/>
            </when>
            <when value="no"/>
        </conditional>
        <param name="groupmode" type="boolean" truevalue="true" falsevalue="false" checked="true" label="groupmode - Collate shared summary results in one file" help="If false, create a summary file per group."/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="subsample_summary" format="tabular" from_work_dir="otu.ave-std" label="${tool.name} on ${on_string}: ave-std.summary">
            <filter>subsample['use'] and not (otu.extension == 'mothur.shared' and not groupmode)</filter>
        </data>
        <data name="summary" format="tabular" from_work_dir="otu*.summary" label="${tool.name} on ${on_string}: summary">
            <filter>groupmode</filter>
        </data>
        <collection name="summaryfiles" type="list" label="${tool.name} on ${on_string}: summaries per group">
            <filter>otu.extension == 'mothur.shared' and not groupmode</filter>
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.summary" format="tabular"/>
        </collection>
    </outputs>
    <tests>
        <test><!-- test with shared and default params -->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <output name="summary" md5="eaf5304b383c3c5764193ac7f49589db" ftype="tabular"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with label select and all calculators -->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <param name="label" value="0.05,0.22,0.32"/>
            <param name="calc" value="ace,bootstrap,chao,jack,sobs,simpsoneven,shannoneven,heip,smithwilson,bergerparker,coverage,goodscoverage,simpson,invsimpson,qstat,shannon,npshannon,boneh,efron,shen,solow,logseries,geometric,bstick,nseqs"/>
            <output name="summary" md5="06039951e867e7d397db08aeb668f94f" ftype="tabular"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with shared and not groupmode -->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <param name="groupmode" value="false"/>
            <output_collection name="summaryfiles" count="2">
                <element name="forest" md5="96e2c1213f25d6c342ba87ab3d2de6bf" ftype="tabular"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with rabund and subsample -->
            <param name="otu" value="amazon.an.rabund" ftype="mothur.rabund"/>
            <param name="use" value="yes"/>
            <param name="subsample" value="10"/>
            <param name="iters" value="42"/>
            <output name="summary" ftype="tabular">
                <assert_contents>
                    <has_text text="shannon"/>
                    <has_text text="unique"/>
                    <has_text text="0.05"/>
                </assert_contents>
            </output>
            <output name="subsample_summary" ftype="tabular">
                <assert_contents>
                    <has_text text="shannon"/>
                    <has_text text="unique"/>
                    <has_text text="0.05"/>
                </assert_contents>
            </output>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The summary.single_ command produce a summary file that has the calculator value for each line in the OTU data and for all possible comparisons between the different groups in the group_ file.  This can be useful if you aren't interested in generating collector's or rarefaction curves for your multi-sample data analysis. It would be worth your while, however, to look at the collector's curves for the calculators you are interested in to determine how sensitive the values are to sampling. If the values are not sensitive to sampling, then you can trust the values. Otherwise, you need to keep sampling.  For calc parameter choices see: https://www.mothur.org/wiki/Calculators

.. _group: https://www.mothur.org/wiki/Group_file
.. _summary.single: https://www.mothur.org/wiki/Summary.single
]]>
    </help>
    <expand macro="citations"/>
</tool>