view quicktree.xml @ 0:1e89a460d1bd draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/quicktree commit ba1e44dfaf0a986252e2fef60a831b819647f25e
author iuc
date Mon, 25 Nov 2024 13:13:10 +0000
parents
children
line wrap: on
line source

<tool id="quicktree" name="Quicktree" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
    <description></description>
    <macros>
        <token name="@TOOL_VERSION@">2.5</token>
        <token name="@VERSION_SUFFIX@">0</token>
    </macros>
    <edam_topics>
        <edam_topic>topic_3293</edam_topic> <!-- phylogenetics -->
    </edam_topics>
    <edam_operations>
        <edam_operation>operation_0540</edam_operation> <!-- Phylogenetic inference (from molecular sequences) -->
    </edam_operations>
    <requirements>
        <requirement type="package" version="@TOOL_VERSION@">quicktree</requirement>
        <requirement type="package" version="3.4">hmmer</requirement> <!-- for file conversion with esl-reformat-->
    </requirements>
    <version_command>quicktree -v</version_command>
    <command detect_errors="exit_code"><![CDATA[

## convert alignment to stockholm before quicktree if needed
#if $input_type.format == "align"
    esl-reformat -o input.quicktree stockholm '$input_file'  ##--informat a2m
#else
    ln -s '$input_file' input.quicktree
#end if

&&

quicktree
#if $input_type.format =="align"
  -in a
#else
  -in m
#end if
#if $output_type == 'tree_out'
  -out t
#else
  -out m
#end if
$upgma
$kimura
#if $boot
  -boot $boot
#end if
input.quicktree
> '$output_file'

    ]]></command>
    <inputs>
        <conditional name="input_type">
            <param name="format" type="select" label="Provide an alignment file or a distance matrix?">
                <option value="align">Alignment File</option>
                <option value="dist">Distance Matrix</option>
            </param>
            <when value="align">
                <param name="input_file" type="data" format="fasta,stockholm,phylip,txt" label="Alignment file" />
            </when>
            <when value="dist">
                <param name="input_file" type="data" format="mothur.dist,mothur.lower.dist,mothur.square.dist,txt" label="Distance Matrix" help="A distance matrix in phylip format (see help below for details). Can be a square distance matrix or a lower triangle distance matrix." />
            </when>
        </conditional>
        <param argument="-upgma" type="boolean" truevalue="-upgma" falsevalue="" checked="false" label="Use the UPGMA method to construct the tree" help="ignored for distance matrix outputs"/>
        <param argument="-kimura" type="boolean" truevalue="-kimura" falsevalue="" checked="false" label="Use the kimura translation for pairwise distances" help="ignored for distance matrix outputs"/>
        <param argument="-boot" type="integer" optional="true" min="0" label="Calcuate bootstrap values with n iterations" help="ignored for distance matrix outputs"/>
        <param name="output_type" type="select" multiple="false" label="Choose output format">
            <option value="dist_out">Distance Matrix (Phylip format)</option>
            <option value="tree_out" selected="true">Tree (Newick format)</option>
        </param>
    </inputs>
    <outputs>
        <data name="output_file" format="newick" label="${tool.name} on ${on_string}: stockholm format">
            <change_format>
                <when input="output_type" value="dist_out" format="mothur.dist" />
            </change_format>
        </data>
    </outputs>
    <tests>
        <test expect_num_outputs="1"><!-- test 1: with fasta input (with reformat) -->
            <param name="format" value="align"/>
            <param name="input_file" value="example.009.AA.fasta" ftype="fasta"/>
            <output name="output_file" file="example.009.AA.newick" ftype="newick"/>
        </test>
        <test expect_num_outputs="1"><!-- test 2: with stockholm input (no reformat)-->
            <param name="format" value="align"/>
            <param name="input_file" value="example.009.AA.stockholm" ftype="stockholm"/>
            <output name="output_file" file="example.009.AA.newick" ftype="newick"/>
        </test>
        <test expect_num_outputs="1"><!-- test 3: with clustalw input -->
            <param name="format" value="align"/>
            <param name="input_file" value="example.011.AA.clw" ftype="txt"/>
            <output name="output_file" file="example.011.AA.newick" ftype="newick"/>
        </test>
        <test expect_num_outputs="1"><!-- test 4: with phylip distance matrix input (lower triangle distance matrix) -->
            <param name="format" value="dist"/>
            <param name="input_file" value="example.001.AA.dist.lt.phy" ftype="mothur.dist"/>
            <output name="output_file" file="example.001.AA.newick" ftype="newick"/>
        </test>
        <test expect_num_outputs="1"><!-- test 5: with phylip distance matrix input (square distance matrix) -->
            <param name="format" value="dist"/>
            <param name="input_file" value="example_dist_square_phylip.dist" ftype="mothur.dist"/>
            <output name="output_file" file="example_dist_square_phylip.newick" ftype="newick"/>
        </test>
        <test expect_num_outputs="1"><!-- test 6: with phylip alignment input -->
            <param name="format" value="align"/>
            <param name="input_file" value="example.011.AA.phy" ftype="phylip"/>
            <output name="output_file" file="example.011.AA.align.newick" ftype="newick"/>
        </test>
        <test expect_num_outputs="1"><!-- test 7: with distance matrix output -->
            <param name="format" value="align"/>
            <param name="input_file" value="example.009.AA.fasta" ftype="fasta"/>
            <param name="output_type" value="dist_out"/>
            <output name="output_file" file="example.009.AA.dist" ftype="mothur.dist"/>
        </test>
         <test expect_num_outputs="1"><!-- test 8: test with all parameters set -->
            <param name="format" value="align"/>
            <param name="input_file" value="example.011.AA.phy" ftype="phylip"/>
            <param name="upgma" value="-upgma"/>
            <param name="kimura" value="-kimura"/>
            <param name="boot" value="100"/>
            <output name="output_file" file="example.011.AA.align.params.newick" ftype="newick"/>
        </test>
    </tests>
    <help><![CDATA[

.. class:: infomark

**What it does**

QuickTree is an efficient implementation of the Neighbor-Joining algorithm, capable of reconstructing phylogenies
from huge alignments in time less than the age of the universe.


**Input**

QuickTree accepts both distance matrix and multiple-sequence-aligment inputs. The former should be in PHYLIP format. The latter should be in Stockholm format, which is the native alignment format for the Pfam database.

Alignments can be supplied in various other formats (fasta, phylip, clustalw, pfam, psiblast, selex) and will be converted to Stockholm format with the esl-reformat program,
which is part of the HMMer package (hmmer.org).

**Output**

Quicktree will output either a distance matrix (in PHYLIP format, square distance matrix) or a Newick tree.


**File Formats**

The **distance matrix** input should be in phylip format, it can be a square matrix or a lower triangle matrix.
The distance matrix output by quicktree will be a square matrix.

Example square distance matrix in phylip format::

       5
    Alpha      0.000 1.000 2.000 3.000 3.000
    Beta       1.000 0.000 2.000 3.000 3.000
    Gamma      2.000 2.000 0.000 3.000 3.000
    Delta      3.000 3.000 3.000 0.000 1.000
    Epsilon    3.000 3.000 3.000 1.000 0.000

Example of a lower triangle matrix::

       7
    Mouse
    Bovine      1.7043
    Lemur       2.0235  1.1901
    Orang       2.0593  1.2005  1.5356
    Gorilla     1.6664  1.3460  1.4577  1.5935
    Chimp       1.7320  1.3757  1.7803  1.7119  1.0635
    Human       1.7101  1.3956  1.6661  1.7599  1.0557  0.6933


* For more details about the PHYLIP distance matrix format, see https://phylipweb.github.io/phylip/doc/distance.html
* For more details about the Newick output format, see https://phylipweb.github.io/phylip/newicktree.html


    ]]></help>
    <citations>
        <citation type="doi">10.1093/oxfordjournals.molbev.a040454</citation>
    </citations>
</tool>