comparison ete-treeviewer.xml @ 0:2d4402c70eed draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ete-toolkit commit d2208e858d6486dd2e832978aca30ca67837cfd6
author iuc
date Tue, 10 Dec 2024 09:55:15 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:2d4402c70eed
1 <tool id="ete_treeviewer" name="ETE tree viewer" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT">
2 <description>visualize a phylogenetic tree</description>
3 <macros>
4 <token name="@TOOL_VERSION@">3.1.3</token>
5 <token name="@VERSION_SUFFIX@">0</token>
6 </macros>
7 <edam_topics>
8 <edam_topic>topic_3293</edam_topic> <!-- phylogenetics -->
9 </edam_topics>
10 <edam_operations>
11 <edam_operation>operation_0567</edam_operation> <!-- phylogenetic tree visualisation -->
12 </edam_operations>
13 <xrefs>
14 <xref type="bio.tools">ete</xref>
15 </xrefs>
16 <requirements>
17 <!--<requirement type="package" version="@TOOL_VERSION@">ete3</requirement>-->
18 <requirement type="package" version="8.10.1">curl</requirement>
19 <requirement type="package" version="1.6.1">xmlstarlet</requirement>
20 <requirement type="package" version="2.58.4">librsvg</requirement>
21 </requirements>
22 <command detect_errors="exit_code"><![CDATA[
23
24 curl http://etetoolkit.org/get_svg/
25 -X POST
26 --retry 10
27 #if $align.align_choice == 'yes'
28 -d "tree=\$(cat '$input_tree');fasta=\$(cat '$align.input_alignment');alg_type=$align.alg_type;$ncbitaxa" | xml format - > tree.svg
29 #else
30 -d "tree=\$(cat '$input_tree');$ncbitaxa" | xml format - > tree.svg
31 #end if
32
33 #if $output_format == 'png'
34 && rsvg-convert -o tree.png tree.svg
35 && mv tree.png '$output_tree_image'
36 #else
37 && mv tree.svg '$output_tree_image'
38 #end if
39
40 ]]></command>
41 <inputs>
42 <param name="input_tree" type="data" format="newick" label="Newick Tree to visualise" />
43 <conditional name="align">
44 <param name="align_choice" type="select" label="Add alignment information to image?" help="Will display alignments in the tree view">
45 <option value="yes">yes</option>
46 <option value="no" selected="true">no</option>
47 </param>
48 <when value="yes">
49 <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" />
50 <param name="alg_type" type="select" multiple="false" label="Alignment display style" help="Will be ignored if no alignment file provided.">
51 <option value="block">Aligned blocks</option>
52 <option value="condensed" selected="true">Condensed format</option>
53 </param>
54 </when>
55 <when value="no"/>
56 </conditional>
57
58 <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." />
59 <param name="output_format" type="select" multiple="false" label="Format of the output image." help="SVG or PNG">
60 <option value="svg" selected="true">SVG</option>
61 <option value="png">PNG</option>
62 </param>
63 </inputs>
64 <outputs>
65 <data name="output_tree_image" format="svg" label="${tool.name} on ${on_string}: Tree Image">
66 <change_format>
67 <when input="output_format" value="png" format="png"/>
68 </change_format>
69 </data>
70 </outputs>
71 <tests>
72 <test expect_num_outputs="1"><!-- test 1: with NCBI TaxIDs -->
73 <param name="input_tree" value="quicktree_alignment_VARL_NCBI.tre" ftype="newick"/>
74 <output name="output_tree_image" file="quicktree_VARL_NCBI.svg" ftype="svg" lines_diff="500" />
75 </test>
76 <test expect_num_outputs="1"><!-- test 2: with alignment file -->
77 <param name="input_tree" value="example-tree-ncbi.tree" ftype="newick"/>
78 <param name="align_choice" value="yes" />
79 <param name="input_alignment" value="example-alignment.fa" ftype="fasta"/>
80 <output name="output_tree_image" ftype="svg">
81 <assert_contents>
82 <has_text text="Generated with ETE http://ete.cgenomics.org"/>
83 <has_text text="Branchiostoma floridae"/>
84 <has_n_lines min="150000" />
85 </assert_contents>
86 </output>
87 </test>
88 <test expect_num_outputs="1"><!-- test 3: with aligment style set -->
89 <param name="input_tree" value="example-tree-ncbi.tree" ftype="newick"/>
90 <param name="align_choice" value="yes" />
91 <param name="input_alignment" value="example-alignment.fa" ftype="fasta"/>
92 <param name="alg_type" value="block"/>
93 <output name="output_tree_image" ftype="svg">
94 <assert_contents>
95 <has_text text="Generated with ETE http://ete.cgenomics.org"/>
96 <has_text text="Branchiostoma floridae"/>
97 <has_n_lines min="25000" max="30000" />
98 </assert_contents>
99 </output>
100 </test>
101 <test expect_num_outputs="1"><!-- test 4: minimal tree, no taxonomy, no alignment -->
102 <param name="input_tree" value="quicktree_alignment_VARL.tre" ftype="newick"/>
103 <param name="align_choice" value="no" />
104 <output name="output_tree_image" file="minimal-tree-out.svg" ftype="svg" lines_diff="0"/>
105 </test>
106 <test expect_num_outputs="1"><!-- test 5: png output -->
107 <param name="input_tree" value="quicktree_alignment_VARL.tre" ftype="newick"/>
108 <param name="output_format" value="png" />
109 <output name="output_tree_image" ftype="png" >
110 <assert_contents>
111 <has_image_width min="500" />
112 <has_image_height min="500" />
113 </assert_contents>
114 </output>
115 </test>
116 </tests>
117 <help><![CDATA[
118
119 .. class:: infomark
120
121 **What it does**
122
123 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.
124
125 **Input**
126
127 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.
128
129 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.
130
131 For example::
132
133 ((6669.DappuP312785:1.24473,(((7739.JGI126010:4.02e-06,7739.JGI126021:0.168081)0.99985:0.848895, [..]
134
135 where 66969 and 7739 are NCBI TaXIDs.
136
137 **Output**
138
139 The tool will output a tree image in SVG or PNG format.
140
141 .. image:: $PATH_TO_IMAGES/example-treeview.png
142 :width: 50%
143 :alt: example tree image
144
145 ]]></help>
146 <citations>
147 <citation type="doi">10.1093/molbev/msw046</citation>
148 </citations>
149 </tool>