-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6614 from shiltemann/ete-tree
[new tool] ETE treeview
- Loading branch information
Showing
9 changed files
with
2,696 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: ete_treeviewer | ||
owner: iuc | ||
categories: | ||
- Phylogenetics | ||
description: A toolkit for the analysis and visualization of trees. | ||
long_description: | | ||
The Environment for Tree Exploration (ETE) is a computational framework that simplifies the | ||
reconstruction, analysis, and visualization of phylogenetic trees and multiple sequence alignments. | ||
remote_repository_url: https://github.com/galaxyproject/tools-iuc/tree/master/tools/ete-toolkit | ||
homepage_url: http://etetoolkit.org | ||
type: unrestricted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
<tool id="ete_treeviewer" name="ETE tree viewer" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT"> | ||
<description>visualize a phylogenetic tree</description> | ||
<macros> | ||
<token name="@TOOL_VERSION@">3.1.3</token> | ||
<token name="@VERSION_SUFFIX@">0</token> | ||
</macros> | ||
<edam_topics> | ||
<edam_topic>topic_3293</edam_topic> <!-- phylogenetics --> | ||
</edam_topics> | ||
<edam_operations> | ||
<edam_operation>operation_0567</edam_operation> <!-- phylogenetic tree visualisation --> | ||
</edam_operations> | ||
<xrefs> | ||
<xref type="bio.tools">ete</xref> | ||
</xrefs> | ||
<requirements> | ||
<!--<requirement type="package" version="@TOOL_VERSION@">ete3</requirement>--> | ||
<requirement type="package" version="8.10.1">curl</requirement> | ||
<requirement type="package" version="1.6.1">xmlstarlet</requirement> | ||
<requirement type="package" version="2.58.4">librsvg</requirement> | ||
</requirements> | ||
<command detect_errors="exit_code"><![CDATA[ | ||
curl http://etetoolkit.org/get_svg/ | ||
-X POST | ||
--retry 10 | ||
#if $align.align_choice == 'yes' | ||
-d "tree=\$(cat '$input_tree');fasta=\$(cat '$align.input_alignment');alg_type=$align.alg_type;$ncbitaxa" | xml format - > tree.svg | ||
#else | ||
-d "tree=\$(cat '$input_tree');$ncbitaxa" | xml format - > tree.svg | ||
#end if | ||
#if $output_format == 'png' | ||
&& rsvg-convert -o tree.png tree.svg | ||
&& mv tree.png '$output_tree_image' | ||
#else | ||
&& mv tree.svg '$output_tree_image' | ||
#end if | ||
]]></command> | ||
<inputs> | ||
<param name="input_tree" type="data" format="newick" label="Newick Tree to visualise" /> | ||
<conditional name="align"> | ||
<param name="align_choice" type="select" label="Add alignment information to image?" help="Will display alignments in the tree view"> | ||
<option value="yes">yes</option> | ||
<option value="no" selected="true">no</option> | ||
</param> | ||
<when value="yes"> | ||
<param name="input_alignment" type="data" format="fasta" optional="true" label="Multiple Alignment FASTA file" help="If provided, will add alignment visualisation to tree image" /> | ||
<param name="alg_type" type="select" multiple="false" label="Alignment display style" help="Will be ignored if no alignment file provided."> | ||
<option value="block">Aligned blocks</option> | ||
<option value="condensed" selected="true">Condensed format</option> | ||
</param> | ||
</when> | ||
<when value="no"/> | ||
</conditional> | ||
|
||
<param name="ncbitaxa" type="boolean" checked="true" truevalue="ncbitaxa=true;" falsevalue="" label="Resolve Taxonomic IDs?" help="Use NCBI numeric taxids as leaf names (or in the format TaxID.sequenceName) in your tree." /> | ||
<param name="output_format" type="select" multiple="false" label="Format of the output image." help="SVG or PNG"> | ||
<option value="svg" selected="true">SVG</option> | ||
<option value="png">PNG</option> | ||
</param> | ||
</inputs> | ||
<outputs> | ||
<data name="output_tree_image" format="svg" label="${tool.name} on ${on_string}: Tree Image"> | ||
<change_format> | ||
<when input="output_format" value="png" format="png"/> | ||
</change_format> | ||
</data> | ||
</outputs> | ||
<tests> | ||
<test expect_num_outputs="1"><!-- test 1: with NCBI TaxIDs --> | ||
<param name="input_tree" value="quicktree_alignment_VARL_NCBI.tre" ftype="newick"/> | ||
<output name="output_tree_image" file="quicktree_VARL_NCBI.svg" ftype="svg" lines_diff="500" /> | ||
</test> | ||
<test expect_num_outputs="1"><!-- test 2: with alignment file --> | ||
<param name="input_tree" value="example-tree-ncbi.tree" ftype="newick"/> | ||
<param name="align_choice" value="yes" /> | ||
<param name="input_alignment" value="example-alignment.fa" ftype="fasta"/> | ||
<output name="output_tree_image" ftype="svg"> | ||
<assert_contents> | ||
<has_text text="Generated with ETE http://ete.cgenomics.org"/> | ||
<has_text text="Branchiostoma floridae"/> | ||
<has_n_lines min="150000" /> | ||
</assert_contents> | ||
</output> | ||
</test> | ||
<test expect_num_outputs="1"><!-- test 3: with aligment style set --> | ||
<param name="input_tree" value="example-tree-ncbi.tree" ftype="newick"/> | ||
<param name="align_choice" value="yes" /> | ||
<param name="input_alignment" value="example-alignment.fa" ftype="fasta"/> | ||
<param name="alg_type" value="block"/> | ||
<output name="output_tree_image" ftype="svg"> | ||
<assert_contents> | ||
<has_text text="Generated with ETE http://ete.cgenomics.org"/> | ||
<has_text text="Branchiostoma floridae"/> | ||
<has_n_lines min="25000" max="30000" /> | ||
</assert_contents> | ||
</output> | ||
</test> | ||
<test expect_num_outputs="1"><!-- test 4: minimal tree, no taxonomy, no alignment --> | ||
<param name="input_tree" value="quicktree_alignment_VARL.tre" ftype="newick"/> | ||
<param name="align_choice" value="no" /> | ||
<output name="output_tree_image" file="minimal-tree-out.svg" ftype="svg" lines_diff="0"/> | ||
</test> | ||
<test expect_num_outputs="1"><!-- test 5: png output --> | ||
<param name="input_tree" value="quicktree_alignment_VARL.tre" ftype="newick"/> | ||
<param name="output_format" value="png" /> | ||
<output name="output_tree_image" ftype="png" > | ||
<assert_contents> | ||
<has_image_width min="500" /> | ||
<has_image_height min="500" /> | ||
</assert_contents> | ||
</output> | ||
</test> | ||
</tests> | ||
<help><![CDATA[ | ||
.. class:: infomark | ||
**What it does** | ||
This is a tool for phylogenetic tree view (newick format) that allows multiple sequence alignments to be shown together with the trees (fasta format). It uses the tree drawing engine implemented in the ETE toolkit, and offers transparent integration with the NCBI taxonomy database. Currently, alignments can be displayed in condensed or block-based format. | ||
**Input** | ||
Input trees should be in Newick format. Optionally a fasta alignment may also be provided. Leaf names in the newick tree should match those in the fasta alignment. | ||
Tip: Use NCBI numeric taxids as leaf names (or in the format TaxID.sequenceName) to get on-the-fly translation of species names and lineages. | ||
For example:: | ||
((6669.DappuP312785:1.24473,(((7739.JGI126010:4.02e-06,7739.JGI126021:0.168081)0.99985:0.848895, [..] | ||
where 66969 and 7739 are NCBI TaXIDs. | ||
**Output** | ||
The tool will output a tree image in SVG or PNG format. | ||
.. image:: $PATH_TO_IMAGES/example-treeview.png | ||
:width: 50% | ||
:alt: example tree image | ||
]]></help> | ||
<citations> | ||
<citation type="doi">10.1093/molbev/msw046</citation> | ||
</citations> | ||
</tool> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.