view classify.seqs.xml @ 6:65b370206748 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 7f7605c2c8d8e92f3369dfdc290e5d8d06fa409a
author iuc
date Fri, 03 Aug 2018 14:37:59 -0400
parents 5b53b77232dc
children
line wrap: on
line source

<tool profile="16.07" id="mothur_classify_seqs" name="Classify.seqs" version="@WRAPPER_VERSION@.0">
    <description>Assign sequences to taxonomy</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <expand macro="version_command"/>
    <command><![CDATA[
@SHELL_OPTIONS@

## enable mothur to find blast
ln -s `dirname \$(which mothur)`/* . &&

## create symlinks to input datasets
ln -s '$fasta' fasta.dat &&
ln -s '$alignment.template' alignment.template.dat &&
ln -s '$tax.taxonomy' tax.taxonomy.dat &&
ln -s '$count' count.dat &&
ln -s '$name' name.dat &&

echo 'classify.seqs(
    fasta=fasta.dat,
    reference=alignment.template.dat,
    taxonomy=tax.taxonomy.dat,
    method=$classify.method,
    #if $classify.method == "wang":
        ksize=$classify.ksize,
        iters=$classify.iters,
        cutoff=$classify.cutoff,
        probs=$classify.probs,
    #elif $classify.method == "knn":
        numwanted=$classify.numwanted,
        search=$classify.search.algorithm,
        #if $classify.search.algorithm == "kmer":
            ksize=$classify.search.ksize,
        #elif $classify.search.algorithm == "blast":
            match=$classify.search.match,
            mismatch=$classify.search.mismatch,
            gapopen=$classify.search.gapopen,
            gapextend=$classify.search.gapextend,
        #end if
    #end if
    #if $count:
        count=count.dat,
    #end if
    #if $name:
        name=name.dat,
    #end if
    relabund=$relabund,
    output=$output,
    printlevel=$printlevel,
    processors='\${GALAXY_SLOTS:-8}'
)'
| sed 's/ //g'  ## mothur trips over whitespace
| ./mothur
| tee mothur.out.log
    ]]></command>
    <inputs>
        <param argument="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
        <conditional name="alignment">
            <param name="source" type="select" label="Select Reference Template from">
                <option value="hist">History</option>
                <option value="ref">Cached Reference</option>
            </param>
            <when value="ref">
                <param argument="reference" name="template" type="select" label="reference - Select an alignment database " help="">
                    <options from_data_table="mothur_aligndb">
                    </options>
                </param>
            </when>
            <when value="hist">
                <param argument="reference" name="template" type="data" format="fasta" label="reference - Reference to align with" help=""/>
            </when>
        </conditional>
        <conditional name="tax">
            <param name="source2" type="select" label="Select Taxonomy from">
                <option value="ref">Cached Reference</option>
                <option value="hist">History</option>
            </param>
            <when value="ref">
                <param argument="taxonomy" type="select" format="mothur.seq.taxonomy" label="taxonomy - Taxonomy reference">
                    <options from_data_table="mothur_taxonomy"/>
                </param>
            </when>
            <when value="hist">
                <param argument="taxonomy" type="data" format="mothur.seq.taxonomy" label="taxonomy - Taxonomy reference"/>
            </when>
        </conditional>
        <conditional name="classify">
            <param argument="method" type="select" label="method - Select a classification method">
                <option value="wang" selected="true">Wang (default)</option>
                <option value="knn">K-Nearest Neighbor (knn)</option>
            </param>
            <when value="wang">
                <param argument="ksize" type="integer" value="8" min="1" label="ksize - kmer length"/>
                <param argument="iters" type="integer" value="100" min="1" label="iters - iterations to do when calculating the bootstrap confidence score"/>
                <param argument="cutoff" type="integer" value="80" min="0" label="cutoff - specify a bootstrap confidence threshold for your taxonomy"/>
                <param argument="probs" type="boolean" falsevalue="false" truevalue="true" checked="true" label="probs - Show probabilities"/>
            </when>
            <when value="knn">
                <param argument="numwanted" type="integer" value="10" label="numwanted - the number of sequence matches you want with the knn method"/>
                <conditional name="search">
                    <param argument="search" name="algorithm" type="select" label="algorithm - " help="">
                        <option value="kmer" selected="true">Kmer (default)</option>
                        <option value="blast">BLAST</option>
                        <option value="suffix">Suffix Tree</option>
                        <option value="distance">Distance</option>
                    </param>
                    <when value="kmer">
                        <param argument="ksize" type="integer" value="8" min="1" label="ksize - kmer length"/>
                    </when>
                    <when value="blast">
                        <param argument="match" type="integer" value="1" label="match - Pairwise alignment reward for a match"/>
                        <param argument="mismatch" type="integer" value="-1" label="mismatch - Pairwise alignment penalty for a mismatch"/>
                        <param argument="gapopen" type="integer" value="-2" label="gapopen - Pairwise alignment penalty for opening a gap"/>
                        <param argument="gapextend" type="integer" value="-1" label="gapextend - Pairwise alignment penalty for extending a gap"/>
                    </when>
                    <when value="suffix"/>
                    <when value="distance"/>
                </conditional>
            </when>
        </conditional>
        <param argument="count" type="data" format="mothur.count_table" optional="true" label="count file"/>
        <param argument="name" type="data" format="mothur.names" optional="true" label="names file"/>
        <param argument="relabund" type="boolean" falsevalue="false" truevalue="true" checked="false"
            label="relabund - allows you to indicate that you want the summary files to be relative abundances rather than raw abundances"/>
        <expand macro="param-output"/>
        <expand macro="param-printlevel"/>
        <expand macro="param-savelog"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="taxonomy_out" format="mothur.seq.taxonomy" from_work_dir="fasta*.taxonomy" label="${tool.name} on ${on_string}: taxonomy"/>
        <data name="tax_summary" format="mothur.tax.summary" from_work_dir="fasta*.tax.summary" label="${tool.name} on ${on_string}: tax.summary"/>
        <data name="tree_sum" format="tabular" from_work_dir="tax.taxonomy*.tree.sum" label="${tool.name} on ${on_string}: tree.sum"/>
    </outputs>
    <tests>
        <test><!-- test with wang method -->
            <param name="fasta" value="amazon.fasta" ftype="fasta"/>
            <param name="source" value="hist"/>
            <param name="template" value="abrecovery.fasta" ftype="fasta"/>
            <param name="source2" value="hist"/>
            <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
            <output name="tax_summary" ftype="mothur.tax.summary">
                <assert_contents>
                    <expand macro="test-taxsummary-format"/>
                    <has_text text="Root"/>
                    <has_text text="Bacteria"/>
                </assert_contents>
            </output>
            <output name="taxonomy_out" ftype="mothur.seq.taxonomy">
                <assert_contents>
                    <has_text text="Bacteria"/>
                    <has_text text="U68589"/>
                </assert_contents>
            </output>
            <output name="tree_sum" md5="b44a392a719cf083e5a26d45904926c6" ftype="tabular">
                <assert_contents>
                    <has_text text="@WRAPPER_VERSION@"/>
                    <has_text text="Root"/>
                    <has_text text="Bacteria"/>
                </assert_contents>
            </output>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with knn method -->
            <param name="fasta" value="amazon.fasta" ftype="fasta"/>
            <param name="source" value="hist"/>
            <param name="template" value="abrecovery.fasta" ftype="fasta"/>
            <param name="source2" value="hist"/>
            <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
            <param name="method" value="knn"/>
            <output name="tax_summary" ftype="mothur.tax.summary">
                <assert_contents>
                    <expand macro="test-taxsummary-format"/>
                    <has_text text="Root"/>
                    <has_text text="Bacteria"/>
                </assert_contents>
            </output>
            <output name="taxonomy_out" ftype="mothur.seq.taxonomy">
                <assert_contents>
                    <has_text text="Bacteria"/>
                    <has_text text="U68589"/>
                </assert_contents>
            </output>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with knn method and blast algorithm -->
            <param name="fasta" value="abrecovery.fasta" ftype="fasta"/>
            <param name="source" value="hist"/>
            <param name="template" value="abrecovery.fasta" ftype="fasta"/>
            <param name="source2" value="hist"/>
            <param name="taxonomy" value="abrecovery.pds.wang.taxonomy" ftype="mothur.seq.taxonomy"/>
            <param name="method" value="knn"/>
            <param name="algorithm" value="blast"/>
            <output name="tax_summary" ftype="mothur.tax.summary">
                <assert_contents>
                    <expand macro="test-taxsummary-format"/>
                    <has_text text="Root"/>
                    <has_text text="Bacteria"/>
                </assert_contents>
            </output>
            <output name="taxonomy_out" ftype="mothur.seq.taxonomy">
                <assert_contents>
                    <has_text text="Bacteria"/>
                    <has_text text="AY457914"/>
                </assert_contents>
            </output>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help><![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The classify.seqs_ command assigns sequences to chosen taxonomy outline.

.. _classify.seqs: https://www.mothur.org/wiki/Classify.seqs


v1.22.0: Updated for Mothur 1.33. Added count parameter (1.28), added relabund parameter (1.33), bayesian term changed to wang.

    ]]></help>
    <expand macro="citations">
        <citation type="doi">10.1128/AEM.00062-07</citation>
        <citation type="doi">10.1093/nar/25.17.3389</citation>
        <citation type="doi"> 10.1128/AEM.03006-05</citation>
    </expand>
</tool>