view cluster.xml @ 9:528f950d1044 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit dfdd4c590370ecb3a9806314d43eb5668e36a01a"
author iuc
date Fri, 22 Jan 2021 01:51:53 +0000
parents 3bb756df109c
children
line wrap: on
line source

<tool profile="16.07" id="mothur_cluster" name="Cluster" version="@WRAPPER_VERSION@.0">
    <description>Assign sequences to OTUs (Operational Taxonomic Unit)</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements">
        <requirement type="package" version="2.6.0">vsearch</requirement>
    </expand>
    <expand macro="stdio"/>
    <expand macro="version_command"/>
    <command><![CDATA[
@SHELL_OPTIONS@

## create symlinks to input datasets
ln -s '$matrix.dist' matrix.dist.dat &&
ln -s '$matrix.name' matrix.name.dat &&
ln -s '$count' count.dat &&

echo 'cluster(
    #if $matrix.format == "phylip":
        phylip=matrix.dist.dat,
    #else
        column=matrix.dist.dat,
    #end if
    #if $matrix.name:
        name=matrix.name.dat,
    #end if
    #if $count:
        count=count.dat,
    #end if
    #if float($cutoff) > 0.0:
        cutoff=$cutoff,
    #end if
    #if $select_method.method =="opti":
        metric=$select_method.metric,
        initialize=$select_method.initialize,
        delta=$select_method.delta,
        iters=$select_method.iters,
    #end if
    precision=$precision,
    sim=$sim,
    method=$select_method.method
)'
| sed 's/ //g'  ## mothur trips over whitespace
| mothur
| tee mothur.out.log
    ]]></command>
    <inputs>
        <conditional name="matrix">
            <param name="format" type="select" label="Cluster based on" help="">
                <option value="column">Pairwise Column Matrix</option>
                <option value="phylip">Phylip Distance Matrix</option>
                <option value="fasta">Fasta (VSEARCH)</option>
            </param>
            <when value="column">
                <param name="dist" argument="column" type="data" format="mothur.pair.dist" label="column - Distance Matrix"/>
                <param argument="name" type="data" format="mothur.names" optional="true" label="name - Sequences Name reference"/>
            </when>
            <when value="phylip">
                <param name="dist" argument="phylip" type="data" format="mothur.dist,mothur.lower.dist,mothur.square.dist" label="phylip - Distance Matrix"/>
                <param argument="name" type="data" format="mothur.names" optional="true" label="name - Sequences Name reference"/>
            </when>
            <when value="fasta">
                <param argument="fasta" type="data" format="mothur.align,fasta" label="Fasta file"/>
            </when>
        </conditional>
        <param argument="count" type="data" format="mothur.count_table" optional="true" label="count - a count_table" help="generated by count.seqs"/>
        <conditional name="select_method">
            <expand macro="param-clustermethods">
                <expand macro="option-vsearch-clustermethods"/>
            </expand>
            <when value="furthest"/>
            <when value="nearest"/>
            <when value="average"/>
            <when value="agc">
                <param argument="fasta" type="data" format="mothur.align,fasta" label="Fasta file"/>
            </when>
            <when value="dgc">
                <param argument="fasta" type="data" format="mothur.align,fasta" label="Fasta file"/>
            </when>
            <when value="opti">
                <expand macro="params-opticlust"/>
            </when>
        </conditional>
        <param argument="cutoff" type="float" value="0.0" label="cutoff - Distance Cutoff threshold - ignored if not > 0.0"
            help="Ignore pairwise distances larger than this, a common value would be 0.10"/>
        <param name="precision" type="select" optional="true" label="precision - Precision for rounding distance values"
            help="Set higher precision for longer genome scale sequence lengths">
            <option value="10">.1</option>
            <option value="100" selected="true">.01</option>
            <option value="1000">.001</option>
            <option value="10000">.0001</option>
            <option value="100000">.00001</option>
            <option value="1000000">.000001</option>
        </param>
        <param argument="sim" type="boolean" checked="false" truevalue="true" falsevalue="false" label="sim - Matrix values are Similary instead of Distance"/>
        <expand macro="param-savelog"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="rabund" format="mothur.rabund" from_work_dir="matrix.dist*.rabund" label="${tool.name} on ${on_string}: rabund (Rank Abundance)"/>
        <data name="sabund" format="mothur.sabund" from_work_dir="matrix.dist*.sabund" label="${tool.name} on ${on_string}: sabund (Species Abundance)"/>
        <data name="otulist" format="mothur.list" from_work_dir="matrix.dist*.list" label="${tool.name} on ${on_string}: list (OTU List)"/>
    </outputs>
    <tests>
        <test><!-- test with phylip input -->
            <param name="format" value="phylip"/>
            <param name="dist" value="amazon.dist"/>
            <output name="rabund" ftype="mothur.rabund">
                <assert_contents>
                    <has_line_matching expression="^0\.03(\t\d+)+$"/>
                </assert_contents>
            </output>
            <output name="sabund" ftype="mothur.sabund">
                <assert_contents>
                    <has_line_matching expression="^0\.03(\t\d+)+$"/>
                </assert_contents>
            </output>
            <output name="otulist" ftype="mothur.list">
                <assert_contents>
                    <expand macro="test-list-format"/>
                    <has_text text="0.03"/>
                    <has_text text="U68688"/>
                </assert_contents>
            </output>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with column input -->
            <param name="format" value="column"/>
            <param name="dist" value="amazon.pair.dist"/>
            <param name="name" value="amazon.names"/>
            <output name="rabund" ftype="mothur.rabund">
                <assert_contents>
                    <has_line_matching expression="^0\.03(\t\d+)+$"/>
                </assert_contents>
            </output>
            <output name="sabund" ftype="mothur.sabund">
                <assert_contents>
                    <has_line_matching expression="^0\.03(\t\d+)+$"/>
                </assert_contents>
            </output>
            <output name="otulist" ftype="mothur.list">
                <assert_contents>
                    <expand macro="test-list-format"/>
                    <has_text text="0.03"/>
                    <has_text text="U68688"/>
                </assert_contents>
            </output>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with column input -->
            <param name="format" value="column"/>
            <param name="dist" value="amazon.pair.dist"/>
            <param name="name" value="amazon.names"/>
            <output name="rabund" ftype="mothur.rabund">
                <assert_contents>
                    <has_line_matching expression="^0\.03(\t\d+)+$"/>
                </assert_contents>
            </output>
            <output name="sabund" ftype="mothur.sabund">
                <assert_contents>
                    <has_line_matching expression="^0\.03(\t\d+)+$"/>
                </assert_contents>
            </output>
            <output name="otulist" ftype="mothur.list">
                <assert_contents>
                    <expand macro="test-list-format"/>
                    <has_text text="0.03"/>
                    <has_text text="U68688"/>
                </assert_contents>
            </output>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help><![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The cluster_ command assign sequences to OTUs (Operational Taxonomy Unit).  The assignment is based on a phylip-formatted_distance_matrix_ or a  column-formatted_distance_matrix_ and name_ file.  It generates a list_, a sabund_ (Species Abundance), and a rabund_ (Relative Abundance) file.

.. _phylip-formatted_distance_matrix: https://www.mothur.org/wiki/Phylip-formatted_distance_matrix
.. _column-formatted_distance_matrix: https://www.mothur.org/wiki/Column-formatted_distance_matrix
.. _name: https://www.mothur.org/wiki/Name_file
.. _list: https://www.mothur.org/wiki/List_file
.. _rabund: https://www.mothur.org/wiki/Rabund_file
.. _sabund: https://www.mothur.org/wiki/Sabund_file
.. _cluster: https://www.mothur.org/wiki/Cluster

    ]]></help>
    <expand macro="citations">
        <citation type="doi">10.1128/AEM.02810-10</citation>
        <citation type="doi">10.1128/AEM.71.3.1501-1506.2005</citation>
    </expand>
</tool>