view clearcut.xml @ 1:d196363872c7 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 721531d2e9fd1e208a3fba8cfbe5dcd572599ca2
author iuc
date Tue, 05 Sep 2017 17:06:49 -0400
parents f979130469f4
children 5c368b76eff7
line wrap: on
line source

<tool profile="16.07" id="mothur_clearcut" name="Clearcut" version="@WRAPPER_VERSION@.0">
    <description>Generate a tree using relaxed neighbor joining</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 "$input.infile" input.infile.dat &&

        echo 'clearcut(
            #if $input.source == "dna":
                fasta=input.infile.dat,
                DNA=true,
            #elif $input.source == "aa":
                fasta=input.infile.dat,
                protein=true,
            #elif $input.source == "phylip":
                phylip=input.infile.dat,
            #end if
            #if $matrixout == "true":
                matrixout=matrixout.dist,
            #end if
            #if $seed:
                seed=$seed,
            #end if
            ntrees=$ntrees,
            norandom=$norandom,
            shuffle=$shuffle,
            expblen=$expblen,
            expdist=$expdist,
            neighbor=$neighbor
        )'
        | sed 's/ //g'  ## mothur trips over whitespace
        | mothur
        | tee mothur.out.log
    ]]></command>
    <inputs>
        <conditional name="input">
            <param name="source" type="select" label="Distance Matrix">
                <option value="dna">DNA Alignment Fasta</option>
                <option value="aa">Protein Alignment Fasta</option>
                <option value="phylip">Phylip Distance Matrix</option>
            </param>
            <when value="dna">
                <param name="infile" type="data" format="mothur.align" label="fasta - Alignment Fasta"/>
            </when>
            <when value="aa">
                <param name="infile" type="data" format="mothur.align" label="fasta - Alignment Fasta"/>
            </when>
            <when value="phylip">
                <param name="infile" type="data" format="mothur.dist,mothur.lower.dist,mothur.square.dist" label="phylip - Distance Matrix"/>
            </when>
        </conditional>
        <param name="seed" type="integer" value="" min="0" optional="true" label="seed - Set the PRNG seed to a specific value"/>
        <param name="ntrees" type="integer" value="1" label="ntrees - the number of output trees you want clearcut to generate (default 1)"/>
        <param name="norandom" type="boolean" checked="false" truevalue="true" falsevalue="false" label="norandom - Attempt joins deterministically"/>
        <param name="shuffle" type="boolean" checked="false" truevalue="true" falsevalue="false" label="shuffle - Randomly shuffle the distance matrix"/>
        <param name="neighbor" type="boolean" checked="true" truevalue="true" falsevalue="false" label="neighbor - Use traditional Neighbor-Joining algorithm"/>
        <param name="expblen" type="boolean" checked="false" truevalue="ON" falsevalue="OFF" label="expblen - Use exponential notation for branch lengths"/>
        <param name="expdist" type="boolean" checked="false" truevalue="ON" falsevalue="OFF" label="expdist - Use exponential notation for distance"/>
        <param name="matrixout" type="boolean" checked="false" truevalue="true" falsevalue="false" label="matrixout - Generate a Distance Matrix"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="tree" format="tre" from_work_dir="input.infile.tre" label="${tool.name} on ${on_string}: tree"/>
        <data name="matrix" format="mothur.lower.dist" from_work_dir="matrixout.dist" label="${tool.name} on ${on_string}: Phylip Distance Matrix">
            <filter>matrixout</filter>
        </data>
    </outputs>
    <tests>
        <test><!-- test with phylip and default params-->
            <param name="source" value="phylip"/>
            <param name="infile" value="env.dist"/>
            <output name="tree" md5="9c78d54267a985c8ae37dcfbddf6f8d0"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with phylip and params set-->
            <param name="source" value="phylip"/>
            <param name="infile" value="env.dist"/>
            <param name="ntrees" value="3"/>
            <param name="shuffle" value="true"/>
            <param name="norandom" value="true"/>
            <param name="neighbor" value="false"/>
            <param name="expblen" value="ON"/>
            <param name="expdist" value="ON"/>
            <param name="matrixout" value="true"/>
            <output name="tree" >
                <assert_contents>
                    <has_text text="group"/>
                </assert_contents>
            </output>
            <output name="matrix" md5="ebc0c296d46cbe4b8d50780b9f5f8314" ftype="mothur.lower.dist"/>
            <expand macro="logfile-test"/>
        </test>
        <test><!-- test with fasta (dna) and matrixout-->
            <param name="source" value="dna"/>
            <param name="infile" value="amazon.align_head"/>
            <param name="matrixout" value="true"/>
            <output name="tree" md5="54ca5ad8aea6598f8ed03e0616b1b568"/>
            <output name="matrix" md5="1c9d7acbd2f1eaba31714cb659c521e8" ftype="mothur.lower.dist"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help>
<![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The clearcut_ command runs clearcut

The clearcut command allows mothur users to run the clearcut_program_ from within mothur. The clearcut program written by Initiative for Bioinformatics and Evolutionary Studies (IBEST) at the University of Idaho. For more information about clearcut please refer to http://bioinformatics.hungry.com/clearcut/

Clearcut is a stand-alone reference implementation of relaxed neighbor joining (RNJ).

Clearcut is capable of taking either a distance matrix or a multiple sequence alignment (MSA) as input.  If necessary, Clearcut will compute corrected distances based on a configurable distance correction model (Jukes-Cantor or Kimura).  Clearcut outputs a phylogenetic tree in Newick format and an optional corrected distance matrix.

.. _clearcut_program: http://bioinformatics.hungry.com/clearcut/
.. _clearcut: https://www.mothur.org/wiki/Clearcut

v.1.20.0: Trivial upgrade to Mothur 1.33
]]>
    </help>
    <expand macro="citations"/>
</tool>