view chimera.uchime.xml @ 0:6dc4f9beec9f 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:50:35 -0400
parents
children d1e70be881e5
line wrap: on
line source

<tool profile="16.07" id="mothur_chimera_uchime" name="Chimera.uchime" version="@WRAPPER_VERSION@.0">
    <description>Find putative chimeras using uchime</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 &&
        #if $template.source == "self":
            ln -s "$template.count" template.count.dat &&
            ln -s "$template.group" template.group.dat &&
        #elif $template.source == "names":
            ln -s "$template.name" template.name.dat &&
        #else:
            ln -s "$template.reference" template.reference.dat &&
        #end if

        echo 'chimera.uchime(
            fasta=fasta.dat,
            #if $template.source == "self":
                reference=self,
                #if float($template.abskew) > 0:
                    abskew=$template.abskew,
                #end if
                #if $template.group:
                    group=template.group.dat,
                #end if
                #if $template.count:
                    count=template.count.dat,
                #end if
            #elif $template.source == "names":
                name=template.name.dat,
            #else:
                reference=template.reference.dat,
            #end if
            minh=$minh,
            mindiv=$mindiv,
            xn=$xn,
            dn=$dn,
            xa=$xa,
            chunks=$chunks,
            minchunk=$minchunk,
            #if $idsmoothwindow:
                idsmoothwindow=$idsmoothwindow,
            #end if
            maxp=$maxp,
            minlen=$minlen,
            maxlen=$maxlen,
            skipgaps=$skipgaps,
            skipgaps2=$skipgaps2,
            #if $alignment.ucl == "local":
                ucl=true,
                #if $alignment.queryfract:
                    queryfract=$alignment.queryfract,
                #end if
            #end if
            dereplicate=$dereplicate,
            chimealns=$chimealns,
            processors='\${GALAXY_SLOTS:-8}'
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur
        | tee mothur.out.log
        2>&1  ## uchime component writes output to stderr
    ]]></command>
    <inputs>
        <param name="fasta" type="data" format="mothur.align,fasta" label="fasta - Candiate Aligned Sequences"/>
        <conditional name="template">
            <param name="source" type="select" label="Select Reference Template from" help="">
                <option value="hist">History</option>
                <option value="ref">Cached Reference</option>
                <option value="self">Self</option>
                <option value="names">Use a names file</option>
            </param>
            <when value="ref">
                <param name="reference" type="select" label="reference - Select an alignment database " help="">
                    <options from_data_table="mothur_aligndb">
                    </options>
                </param>
            </when>
            <when value="hist">
                <param name="reference" type="data" format="fasta" label="reference - Reference to align with" help=""/>
            </when>
            <when value="self">
                <param name="abskew" type="float" value="1.9" label="abskew - Abundance skew (default 1.9)" help="Abundance skew is: min [ abund(parent1), abund(parent2) ] / abund(query)"/>
                <param name="group" type="data" format="mothur.groups" optional="true" label="group - Sequences Name reference" help="use the more abundant sequences from the same sample to check the query sequence"/>
                <param name="count" type="data" format="mothur.count_table" optional="true" label="count - a count_table" help="Generated by count.seqs. When you use a count file with group info and dereplicate=T, mothur will create a *.pick.count_table file containing seqeunces after chimeras are removed."/>
            </when>
            <when value="names">
                <param name="name" type="data" format="mothur.names" label="name - Sequence names"/>
            </when>
        </conditional>
        <param name="dereplicate" type="boolean" falsevalue="false" truevalue="true" checked="false" label="dereplicate - remove chimeric sequences from all groups, default=f" help="If parameter is false, then if one group finds the seqeunce to be chimeric, then all groups find it to be chimeric"/>
        <param name="skipgaps" type="boolean" falsevalue="false" truevalue="true" checked="true" label="skipgaps - columns containing gaps do not count as diffs. Default=T" help="controls how gapped columns affect counting of diffs"/>
        <param name="skipgaps2" type="boolean" falsevalue="false" truevalue="true" checked="true" label="skipgaps2 - column is immediately adjacent to a column containing a gap, it is not counted as a diff. Default=T" help="controls how gapped columns affect counting of diffs"/>
        <param name="chimealns" type="boolean" falsevalue="false" truevalue="true" checked="false" label="chimealns - Produce a file containing multiple alignments of query sequences to parents in human readable format. " help="Alignments show columns with differences that support or contradict a chimeric model."/>
        <param name="minh" type="float" value="0.3" min="0" label="minh - mininum score to report chimera. Default 0.3" help="Values from 0.1 to 5 might be reasonable. Lower values increase sensitivity but may report more false positives."/>
        <param name="mindiv" type="float" value="0.5" min="0" label="mindiv - minimum divergence ratio, default 0.5" help="to ignore very close chimeras, increase mindiv to 1.0 or 2.0, to increase sensitivity decrease minh to 0.1"/>
        <param name="xn" type="float" value="8.0" min="0" label="xn - weight of a no vote. Default 8.0" help="Decreasing this weight to around 3 or 4 may give better performance on denoised data"/>
        <param name="dn" type="float" value="1.4" min="0" label="dn - pseudo-count prior on number of no votes. Default 1.4" help="Reasonable values are probably in the range from 0.2 to 2.0"/>
        <param name="xa" type="float" value="1.0" min="0" label="xa - eight of an abstain vote. Default 1.0" help="Reasonable values might range from 0.1 to 2.0"/>
        <param name="chunks" type="integer" value="4" min="0" label="chunks - number of chunks. Default 4." help="number of chunks to extract from the query sequence when searching for parents."/>
        <param name="minchunk" type="integer" value="64" min="0" label="minchunk - minimum length of a chunk. Default 64." help=""/>
        <param name="maxp" type="integer" value="2" min="0" label="maxp - maximum number of candidate parents to consider. Default 2" help="increasing maxp gives only a very small improvement in sensivity but tends to increase the error rate quite a bit"/>
        <param name="minlen" type="integer" value="10" min="0" label="minlen - minimum unaligned sequence length. Default 10" help="Applies to both query and reference sequences."/>
        <param name="maxlen" type="integer" value="10000" min="0" label="maxlen - maximum unaligned sequence length. Defaults 10000" help="Applies to both query and reference sequences."/>
        <param name="idsmoothwindow" type="integer" value="32" min="0" optional="True" label="idsmoothwindow - the length of id smoothing window. Default 32" help=""/>
        <conditional name="alignment">
            <param name="ucl" type="select" label="ucl - Use local-X alignments" help="global-X is the default">
                <option value="global" selected="true">global</option>
                <option value="local">local</option>
            </param>
            <when value="global"/>
            <when value="local">
                <param name="queryfract" type="float" value="0.5" min="0" max="1" label="queryfract - minimum fraction of the query sequence that must be covered by a local-X alignment. Default 0.5." help=""/>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="out_file" format="txt" from_work_dir="fasta.*uchime.chimeras" label="${tool.name} on ${on_string}: uchime.chimeras"/>
        <data name="out_accnos" format="mothur.accnos" from_work_dir="fasta.*uchime.accnos" label="${tool.name} on ${on_string}: uchime.accnos"/>
        <data name="out_alns" format="txt" from_work_dir="fasta.*uchime.alns" label="${tool.name} on ${on_string}: uchime.alns">
            <filter>chimealns</filter>
        </data>
        <data name="out_count" format="mothur.count_table" from_work_dir="template.*uchime.pick.count_table" label="${tool.name} on ${on_string}: uchime.count_table">
            <filter>template['count']</filter>
        </data>
    </outputs>
    <tests>
        <test><!-- default params test -->
            <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.align_head_withchimera"/>
            <param name="source" value="hist"/>
            <param name="reference" value="HMP_MOCK.v35.align"/>
            <output name="out_file" file="Mock_S280_L001_R1_001_small.trim.contigs.good.ref.uchime.chimeras" ftype="txt"/>
            <output name="out_accnos" file="Mock_S280_L001_R1_001_small.trim.contigs.good.ref.uchime.accnos" ftype="mothur.accnos"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- de novo test -->
            <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.align_head"/>
            <param name="source" value="self"/>
            <output name="out_file" file="Mock_S280_L001_R1_001_small.trim.contigs.good.denovo.uchime.chimeras" ftype="txt"/>
            <output name="out_accnos" md5="d41d8cd98f00b204e9800998ecf8427e" ftype="mothur.accnos"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- with chimealns output -->
            <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.align_head_withchimera"/>
            <param name="source" value="hist"/>
            <param name="reference" value="HMP_MOCK.v35.align"/>
            <param name="chimealns" value="true"/>
            <output name="out_file" file="Mock_S280_L001_R1_001_small.trim.contigs.good.ref.uchime.chimeras" ftype="txt"/>
            <output name="out_accnos" file="Mock_S280_L001_R1_001_small.trim.contigs.good.ref.uchime.accnos" ftype="mothur.accnos"/>
            <output name="out_alns" file="Mock_S280_L001_R1_001_small.trim.contigs.good.ref.uchime.alns" ftype="txt"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The chimera.uchime_ command reads a fasta file and reference file and outputs potentially chimeric sequences. The original uchime program was written by Robert C. Edgar and donated to the public domain, http://drive5.com/uchime

.. _chimera.uchime: https://www.mothur.org/wiki/Chimera.uchime

Version 1.23.0: Upgrades tool dependency to mothur 1.33 and adds support for count (mothur 1.28) and dereplicate (mothur 1.29) options.
]]>
    </help>
    <expand macro="citations"/>
</tool>