view pre.cluster.xml @ 0:cad74a5a9a6f 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:49:39 -0400
parents
children 39cfb67a03c0
line wrap: on
line source

<tool profile="16.07" id="mothur_pre_cluster" name="Pre.cluster" version="@WRAPPER_VERSION@.0">
    <description>Remove sequences due to pyrosequencing errors</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 "$fasta" fasta.dat &&
        ln -s "$name" name.dat &&
        ln -s "$group" group.dat &&

        echo 'pre.cluster(
            fasta=fasta.dat,
            #if $name.is_of_type("mothur.names"):
                name=name.dat,
            #elif $name.is_of_type("mothur.count_table"):
                count=name.dat,
            #end if
            #if $group:
                group=group.dat,
            #end if
            diffs=$diffs,
            match=$match,
            mismatch=$mismatch,
            gapopen=$gapopen,
            gapextend=$gapextend,
            topdown=$topdown,
            processors='\${GALAXY_SLOTS:-8}'
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur
        | tee mothur.out.log &&

        if [ -f fasta.precluster.map ]; then mv fasta.precluster.map fasta.precluster.fasta.map; fi
    ]]></command>
    <inputs>
        <param name="fasta" type="data" format="fasta" label="fasta - Sequence Fasta"/>
        <param name="name" type="data" format="mothur.names,mothur.count_table" optional="true" label="name file or count table - Sequences Name reference"/>
        <param name="group" type="data" format="mothur.groups" optional="true" label="group - Sequences Name reference"/>
        <param name="diffs" type="integer" value="1" min="0" label="diffs - Number of mismatched bases to allow between sequences in a group (default 1)"/>
        <param name="match" type="integer" value="1" label="match - reward for a match (default 1)"/>
        <param name="mismatch" type="integer" value="-1" label="mismatch - penalty for a mismatch (default -1)"/>
        <param name="gapopen" type="integer" value="-2" label="gapopen - penalty for opening a gap (default -2)"/>
        <param name="gapextend" type="integer" value="-1" label="gapextend - penalty for extending a gap (default -1)"/>
        <param name="topdown" type="boolean" truevalue="true" falsevalue="false" checked="true" label="topdown" help="cluster from largest abundance to smallest or vice versa. Default=Yes, meaning largest to smallest"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="fasta_out" format_source="fasta" from_work_dir="fasta*.precluster.dat" label="${tool.name} on ${on_string}: precluster.fasta"/>
        <data name="names_out" format="mothur.names" from_work_dir="fasta*.precluster.names" label="${tool.name} on ${on_string}: precluster.names">
            <filter>name.ext != "mothur.count_table"</filter>
        </data>
        <data name="count_out" format="mothur.count_table" from_work_dir="fasta*.precluster.count_table" label="${tool.name} on ${on_string}: precluster.count_table">
            <filter>name.ext == "mothur.count_table"</filter>
        </data>
        <collection name="map_out" type="list" label="${tool.name} on ${on_string}: precluster.map">
            <discover_datasets pattern="fasta\.precluster\.(?P&lt;designation&gt;.*)\.map" format="tabular"/>
        </collection>
    </outputs>
    <tests>
        <test><!-- test with fasta and names file -->
            <param name="fasta" value="amazon.fasta_head" ftype="fasta"/>
            <param name="name" value="amazon.head.names" ftype="mothur.names"/>
            <output name="fasta_out" md5="d5d37ace0f2a5c020edd0aa9eb7aca9b" ftype="fasta"/>
            <output name="names_out" md5="51090fe5e111920ec1003c2073532d96" ftype="mothur.names"/>
            <output_collection name="map_out" count="1">
                <element name="fasta" md5="c2ca7b0d45aa3881c7bd5cb8a44c853b" ftype="tabular"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with fasta and count table -->
            <param name="fasta" value="amazon.fasta_head" ftype="fasta"/>
            <param name="name" value="amazon.count_table" ftype="mothur.count_table"/>
            <output name="fasta_out" md5="d5d37ace0f2a5c020edd0aa9eb7aca9b" ftype="fasta"/>
            <output name="count_out" md5="9831e271b9a96f91ad700f84aeed03a5" ftype="mothur.count_table"/>
            <output_collection name="map_out" count="1">
                <element name="fasta" md5="c2ca7b0d45aa3881c7bd5cb8a44c853b" ftype="tabular"/>
            </output_collection>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The pre.cluster_ command implements a pseudo-single linkage algorithm with the goal of removing sequences that are likely due to pyrosequencing errors. The basic idea is that abundant sequences are more likely to generate erroneous sequences than rare sequences. With that in mind, the algorithm proceeds by ranking sequences in order of their abundance. Then we walk through the list of sequences looking for rarer sequences that are within some threshold of the original sequence. Those that are within the threshold are merged with the larger sequence. The original Huse method performs this task on a distance matrix, whereas we do it based on the original sequences. The advantage of our approach is that the algorithm works on aligned sequences instead of a distance matrix. This is advantageous because by pre-clustering you remove a large number of sequences making the distance calculation much faster.

.. _pre.cluster: https://www.mothur.org/wiki/Pre.cluster

v1.24.0: Updated to mothur 1.33, added count and topdown parameter
]]>
    </help>
    <expand macro="citations"/>
</tool>