view dist.shared.xml @ 4:3e2ca0c67e9d draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit be5c8af076296a53959fc3ed2b82d92dc7607eeb
author iuc
date Mon, 23 Apr 2018 09:45:35 -0400
parents b7da1494afa1
children
line wrap: on
line source

<tool profile="16.07" id="mothur_dist_shared" name="Dist.shared" version="@WRAPPER_VERSION@.0">
    <description>Generate a phylip-formatted dissimilarity distance matrix among multiple 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 '$otu' otu.dat &&

echo 'dist.shared(
    shared=otu.dat,
    #if $label:
        label=${ str($label).replace(",","-") },
    #end if
    #if $groups:
        groups=${ str($groups).replace(",","-") },
    #end if
    #if $calc:
        calc=${ str($calc).replace(",","-") },
    #end if
    #if $subsampling.use == "yes":
        #if $subsampling.subsample:
            subsample=$subsampling.subsample,
        #else
            subsample=T,
        #end if
        iters=$subsampling.iters,
    #end if
    output=$output,
    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 - OTU Shared"/>
        <param name="label" type="select" label="label - OTU Labels to calculate" multiple="true">
            <expand macro="labeloptions"/>
        </param>
        <param name="groups" type="select" label="groups - Groups to analyze" 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">
            <expand macro="calc-common"/>
            <!-- set default option(s) -->
            <option value="jclass" selected="true">jclass - Community Membership Similarity the traditional Jaccard similarity coefficient based on the observed richness</option>
            <option value="thetayc" selected="true">thetayc - Community Structure Similarity the Yue &amp; Clayton theta similarity coefficient</option>
        </param>
        <conditional name="subsampling">
            <param name="use" type="select" label="subsample">
                <option value="no" selected="true">no</option>
                <option value="yes">yes</option>
            </param>
            <when value="yes">
                <param name="subsample" type="integer" value="" min="0" optional="true" label="subsample (defaults to the size of the smallest group)"
                    help="Should not exceed the number of sequences in any group"/>
                <param name="iters" type="integer" value="1000" min="1" optional="true" label="iters - Number of iterations to try (default 1000)"/>
            </when>
            <when value="no"/>
        </conditional>
        <param name="output" type="select" label="output - Distance Matrix Output Format" help="A Distance Matrix will be generated for each calculator label pair">
            <option value="lt" selected="true">Phylip formatted Lower Triangle Matrix</option>
            <option value="square">Phylip formatted Square Matrix</option>
        </param>
        <expand macro="param-savelog"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <collection name="distfiles" type="list" label="${tool.name} on ${on_string}: dist files">
            <discover_datasets pattern=".*?\.(?P&lt;designation&gt;.*)\.dist" format="mothur.dist"/>
        </collection>
    </outputs>
    <tests>
        <test><!-- test with defaults -->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <output_collection name="distfiles" count="72">
                <element name="thetayc.0.33.lt" md5="c707e43f14c2022f4027e6a2495cbae8" ftype="mothur.dist"/>
            </output_collection>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with label,group select and all calculators -->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <param name="label" value="0.05,0.22"/>
            <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,structeuclidean,structpearson,sharednseqs,sharedobserved"/>
            <output_collection name="distfiles" count="74">
                <element name="gower.0.22.lt" md5="209dbf7e9f1e13753524905f64c8e3b7" ftype="mothur.dist"/>
            </output_collection>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with subsampling without specifying size -->
            <param name="otu" value="amazon.an.shared" ftype="mothur.shared"/>
            <param name="label" value="0.03,0.33"/>
            <param name="use" value="yes"/>
            <param name="calc" value="canberra"/>
            <param name="output" value="square"/>
            <output_collection name="distfiles" count="6">
                <element name="canberra.0.33.square.std" ftype="mothur.dist">
                    <assert_contents>
                        <has_text text="forest"/>
                        <has_text text="pasture"/>
                    </assert_contents>
                </element>
            </output_collection>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with subsampling with specifying size-->
            <param name="otu" value="amazon.mothur.shared" ftype="mothur.shared"/>
            <param name="use" value="yes"/>
            <param name="subsample" value="2"/>
            <param name="iters" value="42"/>
            <param name="label" value="0.10"/>
            <param name="calc" value="canberra"/>
            <param name="output" value="square"/>
            <output_collection name="distfiles" count="3">
                <element name="canberra.0.10.square.std" ftype="mothur.dist">
                    <assert_contents>
                        <has_text text="forest"/>
                        <has_text text="pasture"/>
                    </assert_contents>
                </element>
            </output_collection>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help><![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The dist.shared_ command will generate a phylip-formatted_distance_matrix_ that describes the dissimilarity (1-similarity) among multiple groups from a shared_ file. For calc parameter choices see: https://www.mothur.org/wiki/Calculators

.. _phylip-formatted_distance_matrix: https://www.mothur.org/wiki/Phylip-formatted_distance_matrix
.. _shared: https://www.mothur.org/wiki/Shared_file
.. _dist.shared: https://www.mothur.org/wiki/Dist.shared

v1.26.0: Updated to Mothur 1.33. Omitted calculators since they do not appear to be available.

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