view tools/mothur/summary.shared.xml @ 0:ee4fee239fe7 draft default tip

planemo upload commit 68a4fd4cc5332c57ac39bef73db224425af0706c-dirty
author sanbi-uwc
date Fri, 03 Jun 2016 09:32:47 -0400
parents
children
line wrap: on
line source

<tool profile="16.07" id="mothur_summary_shared" name="Summary.shared" version="@WRAPPER_VERSION@.0">
    <description>Summary of calculator values for OTUs</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="version_command"/>
    <command detect_errors="aggressive"><![CDATA[
        echo 'summary.shared(
            shared=$otu,
            #if $groups:
                label=${ str($label).replace(",","-") },
            #end if
            #if $label:
                groups=${ str($groups).replace(",","-") },
            #end if
            #if $calc:
                calc=${ str($calc).replace(",","-") },
            #end if
            all=$all,
            distance=$distance,
            #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
            output=$output,
            processors='\${GALAXY_SLOTS:-8}'
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur &&

        ## move output files to correct destination
        prefix='$otu' &&
        mv \${prefix%.dat}*.summary '$summary' &&
        #if $distance:
            mv \${prefix%.dat}*.dist . &&
        #end if
        mv mothur.*.logfile '$logfile'
    ]]></command>
    <inputs>
        <param name="otu" type="data" format="mothur.shared" label="shared - OTU Shared"/>
        <param name="label" type="select" label="label - OTU Labels" multiple="true">
            <expand macro="labeloptions"/>
        </param>
        <param name="groups" type="select" label="groups - Pairwise comparision groups" multiple="true">
            <options>
                <filter type="data_meta" ref="otu" key="groups"/>
            </options>
        </param>
        <param name="calc" type="select" label="calc - Calculators (Uses defaults if none selected)" multiple="true">
            <option value="sharedsobs" selected="true">sharedsobs - Shared community richness the observed richness shared between two or more samples</option>
            <option value="sharedchao" selected="true">sharedchao - Shared community richness the two or more sample shared Chao1 richness estimator</option>
            <option value="sharedace" selected="true">sharedace - Shared community richness the two sample shared ACE richness estimator</option>
            <option value="anderberg">anderberg - Community Membership Similarity the Anderberg similarity coefficient</option>
            <option value="jclass" selected="true">jclass - Community Membership Similarity the traditional Jaccard similarity coefficient based on the observed richness</option>
            <option value="jest" selected="true">jest - Community Membership Similarity the Jaccard similarity coefficient based on the Chao1 estimated richnesses</option>
            <option value="kulczynski">kulczynski - Community Membership Similarity the Kulczynski similarity coefficient</option>
            <option value="kulczynskicody">kulczynskicody - Community Membership Similarity the Kulczynski-Cody similarity coefficient</option>
            <option value="kstest">kstest - Community Membership Similarity Kolmogorov-Smirnov test</option>
            <option value="lennon">lennon - Community Membership Similarity the Lennon similarity coefficient</option>
            <option value="ochiai">ochiai - Community Membership Similarity the Ochiai similarity coefficient</option>
            <option value="sorclass" selected="true">sorclass - Community Membership Similarity the Sorenson similarity coefficient based on the observed richness</option>
            <option value="sorest" selected="true">sorest - Community Membership Similarity the Sorenson similarity coefficient based on the Chao1 estimated richnesses</option>
            <option value="whittaker">whittaker - Community Membership Similarity the Whittaker similarity coefficient</option>
            <option value="hamming">hamming - Community Membership Similarity -</option>
            <option value="memchi2">memchi2 - Community Membership Similarity -</option>
            <option value="memchord">memchord - Community Membership Similarity -</option>
            <option value="memeuclidean">memeuclidean - Community Membership Similarity -</option>
            <option value="mempearson">mempearson - Community Membership Similarity -</option>
            <option value="braycurtis">braycurtis - Community Structure Similarity the Bray-Curtis similarity coefficient</option>
            <option value="jabund" selected="true">jabund - Community Structure Similarity the abundance-based Jaccard similarity coefficient</option>
            <option value="morisitahorn">morisitahorn - Community Structure Similarity the Morisita-Horn similarity coefficient</option>
            <option value="sorabund" selected="true">sorabund - Community Structure Similarity the abundance-based Sorenson similarity coefficient</option>
            <option value="thetan" selected="true">thetan - Community Structure Similarity the Smith theta similarity coefficient</option>
            <option value="thetayc" selected="true">thetayc - Community Structure Similarity the Yue &amp; Clayton theta similarity coefficient</option>
            <option value="canberra">canberra - Community Structure Similarity -</option>
            <option value="gower">gower - Community Structure Similarity -</option>
            <option value="hellinger">hellinger - Community Structure Similarity -</option>
            <option value="manhattan">manhattan - Community Structure Similarity -</option>
            <option value="odum">odum - Community Structure Similarity -</option>
            <option value="soergel">soergel - Community Structure Similarity -</option>
            <option value="spearman">spearman - Community Structure Similarity -</option>
            <option value="speciesprofile">speciesprofile - Community Structure Similarity -</option>
            <option value="structchi2">structchi2 - Community Structure Similarity -</option>
            <option value="structchord">structchord - Community Structure Similarity -</option>
            <option value="structeuclidean">structeuclidean - Community Structure Similarity -</option>
            <option value="structkulczynski">structkulczynski - Community Structure Similarity -</option>
            <option value="structpearson">structpearson - Community Structure Similarity -</option>
            <option value="sharednseqs">sharednseqs - Utility the number of sequences in two samples</option>
            <option value="sharedobserved">sharedobserved - Utility the number of sequences in two samples</option>
        </param>
        <param name="all" type="boolean" truevalue="true" falsevalue="false" checked="false" label="all - Include RAM intensive sharedsobs and sharedchao calculations"/>
        <param name="distance" type="boolean" truevalue="true" falsevalue="false" checked="false" label="distance - Output a distance file for each calculator at each label"/>
        <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 pergroup of the sample" help="Leave blank to use the size of your smallest group"/>
                <param name="iters" type="integer" value="" min="1" optional="true" label="iters - Number of times to run the subsample"/>
            </when>
            <when value="no"/>
        </conditional>
        <param name="output" type="select" label="output - Distance Matrix Output Format" help="">
            <option value="lt" selected="true">Phylip formatted Lower Triangle Matrix</option>
            <option value="square">Phylip formatted Square Matrix</option>
        </param>
    </inputs>
    <outputs>
        <data name="logfile" format="txt" label="${tool.name} on ${on_string}: logfile"/>
        <data name="summary" format="tabular" label="${tool.name} on ${on_string}: shared.summary"/>
        <collection name="distfiles" type="list" label="${tool.name} on ${on_string}: dist">
            <filter>distance</filter>
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.dist" format="mothur.dist">
                <!-- doesn't seem to work for collection elements yet
                <change_format>
                    <when input="output" value="lt" format="mothur.lower.dist"/>
                    <when input="output" value="square" format="mothur.square.dist"/>
                </change_format>
                -->
            </discover_datasets>
        </collection>
    </outputs>
    <tests>
        <test><!-- test with defaults -->
            <param name="otu" value="amazon.an.shared"/>
            <output name="summary" md5="29384359e341721b3519fba35b9301e4" ftype="tabular"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with subsample -->
            <param name="otu" value="amazon.an.shared"/>
            <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="forest"/>
                    <has_text text="pasture"/>
                </assert_contents>
            </output>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with label and groups select and all calculators -->
            <param name="otu" value="amazon.an.shared"/>
            <param name="label" value="0.05,0.22,0.32"/>
            <param name="groups" value="forest,pasture"/>
            <param name="calc" value="sharedsobs,sharedchao,sharedace,anderberg,jclass,jest,kulczynski,kulczynskicody,kstest,lennon,ochiai,sorclass,sorest,whittaker,hamming,memchi2,memchord,memeuclidean,mempearson,braycurtis,jabund,morisitahorn,sorabund,thetan,thetayc,canberra,gower,hellinger,manhattan,odum,soergel,spearman,speciesprofile,structchi2,structchord,structeuclidean,structkulczynski,structpearson,sharednseqs,sharedobserved"/>
            <output name="summary" md5="acd56d4ab09ec1c2117f5e4840a875a1" ftype="tabular"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with distance output collection -->
            <param name="otu" value="amazon.an.shared"/>
            <param name="distance" value="true"/>
            <output name="summary" ftype="tabular">
                <assert_contents>
                    <has_text text="forest"/>
                    <has_text text="pasture"/>
                </assert_contents>
            </output>
            <param name="calc" value="sorclass"/>
            <output_collection name="distfiles" count="36">
                <element name="sorclass.0.29.lt" ftype="mothur.dist">
                    <assert_contents>
                        <has_text text="forest"/>
                        <has_text text="pasture"/>
                    </assert_contents>
                </element>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documenation**

The summary.shared_ command produce a summary file that has the calculator value for each line in the OTU data of the shared_ file 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: http://www.mothur.org/wiki/Calculators

.. _shared: http://www.mothur.org/wiki/Shared_file
.. _group: http://www.mothur.org/wiki/Group_file
.. _summary.shared: http://www.mothur.org/wiki/Summary.shared
]]>
    </help>
    <expand macro="citations"/>
</tool>