view clearcut.xml @ 8:f7fabe2362b8 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit ff56a4c9218ddea84ff5cd72fd98c62db212465d"
author iuc
date Thu, 05 Nov 2020 23:08:51 +0000
parents 7ad44d831a1f
children
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 argument="fasta" name="infile" type="data" format="mothur.align" label="fasta - Alignment Fasta"/>
            </when>
            <when value="aa">
                <param argument="fasta" name="infile" type="data" format="mothur.align" label="fasta - Alignment Fasta"/>
            </when>
            <when value="phylip">
                <param argument="phylip" name="infile" type="data" format="mothur.dist,mothur.lower.dist,mothur.square.dist" label="phylip - Distance Matrix"/>
            </when>
        </conditional>
        <param argument="seed" type="integer" value="" min="0" optional="true" label="seed - Set the PRNG seed to a specific value"/>
        <param argument="ntrees" type="integer" value="1" label="ntrees - the number of output trees you want clearcut to generate (default 1)"/>
        <param argument="norandom" type="boolean" checked="false" truevalue="true" falsevalue="false" label="norandom - Attempt joins deterministically"/>
        <param argument="shuffle" type="boolean" checked="false" truevalue="true" falsevalue="false" label="shuffle - Randomly shuffle the distance matrix"/>
        <param argument="neighbor" type="boolean" checked="true" truevalue="true" falsevalue="false" label="neighbor - Use traditional Neighbor-Joining algorithm"/>
        <param argument="expblen" type="boolean" checked="false" truevalue="ON" falsevalue="OFF" label="expblen - Use exponential notation for branch lengths"/>
        <param argument="expdist" type="boolean" checked="false" truevalue="ON" falsevalue="OFF" label="expdist - Use exponential notation for distance"/>
        <param argument="matrixout" type="boolean" checked="false" truevalue="true" falsevalue="false" label="matrixout - Generate a Distance Matrix"/>
        <expand macro="param-savelog"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="tree" format="mothur.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"/>
            <param name="savelog" value="true"/>
            <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" file="clearcut1.matrix" ftype="mothur.lower.dist"/>
            <param name="savelog" value="true"/>
            <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" file="clearcut2.matrix" ftype="mothur.lower.dist"/>
            <param name="savelog" value="true"/>
            <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. 

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: https://www.mothur.org/wiki/Clearcut

v.1.20.0: Trivial upgrade to Mothur 1.33

    ]]></help>
    <expand macro="citations">
        <citation type="doi">10.1093/bioinformatics/btl478</citation>
    </expand>
</tool>