annotate tools/taxonomy/t2ps_wrapper.xml @ 1:cdcb0ce84a1b

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:15 -0500
parents 9071e359b9a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="Draw_phylogram" name="Draw phylogeny" version="1.0.0">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description></description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <requirements>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 <requirement type="package">taxonomy</requirement>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 </requirements>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 <command interpreter="python">t2ps_wrapper.py $input $out_file1 $max_tree_level $font_size $max_leaves 1</command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 <param format="taxonomy" name="input" type="data" label="Draw phylogram for"></param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 <param name="max_tree_level" label="show ranks from root to" type="select" help="Choosing to show entire tree may produce very large PDF file disabling your viewer">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 <option value="8">Class</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 <option value="0">Show entire tree</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 <option value="1">Superkingdom</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 <option value="2">Kingdom</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 <option value="3">Subkingdom</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 <option value="4">Superphylum</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 <option value="5">Phylum</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 <option value="6">Subphylum</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 <option value="7">Superclass</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 <option value="9">Subclass</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 <option value="10">Superorder</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 <option value="11">Order</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 <option value="12">Suborder</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 <option value="13">Superfamily</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 <option value="14">Family</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 <option value="15">Subfamily</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 <option value="16">Tribe</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 <option value="17">Subtribe</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 <option value="18">Genus</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 <option value="19">Subgenus</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 <option value="20">Species</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31 <option value="21">Subspecies</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 <param name="font_size" type="select" label="select font size">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 <option value="8">Normal</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 <option value="4">Tiny</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 <option value="12">Large</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 <param name="max_leaves" type="text" size="5" value="0" label="maximum number of leaves" help="set to 0 to show all"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 <data format="pdf" name="out_file1" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 <requirements>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 <requirement type="binary">tree2PS-fast</requirement>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 </requirements>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 **What it does**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 Given taxonomy representation (produced by *Taxonomy manipulation->Fetch Taxonomic Ranks* tool) this utility produces a graphical representations of phylogenetic tree in PDF format.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 --------
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 **Example 1: Fake data**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 Suppose you have the following dataset::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 Species_1 1 root superkingdom1 kingdom1 subkingdom1 superphylum1 phylum1 subphylum1 superclass1 class1 subclass1 superorder1 order1 suborder1 superfamily1 family1 subfamily1 tribe1 subtribe1 genus1 subgenus1 species1 subspecies1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 Species_2 2 root superkingdom1 kingdom1 subkingdom1 superphylum1 phylum1 subphylum1 superclass1 class1 subclass1 superorder1 order1 suborder1 superfamily1 family1 subfamily1 tribe1 subtribe1 genus2 subgenus2 species2 subspecies2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 Species_3 3 root superkingdom1 kingdom1 subkingdom1 superphylum1 phylum3 subphylum3 superclass3 class3 subclass3 superorder3 order3 suborder3 superfamily3 family3 subfamily3 tribe3 subtribe3 genus3 subgenus3 species3 subspecies3
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 Species_4 4 root superkingdom1 kingdom1 subkingdom1 superphylum1 phylum4 subphylum4 superclass4 class4 subclass4 superorder4 order4 suborder4 superfamily4 family4 subfamily4 tribe4 subtribe4 genus4 subgenus4 species4 subspecies4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 Drawing the tree with default parameters (without changing anything in the interface) will produce this tree:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 .. image:: ./static/images/t2ps_ideal.png
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 :width: 500
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68 (for explanation of colors and numbers on the tree scroll to the bottom of this help section)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70 Here *Class* rank represent terminal nodes (leaves) of the tree because it is the default setting of the "*show ranks from root to*" drop-down. Changing the drop-down to "*Subspecies*" will produce this:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 .. image:: ./static/images/t2ps_ideal_ssp.png
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 :width: 1000
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 --------
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77 **Example 2: Fake data with missing nodes**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79 Real taxonomic datasets almost always contain empty nodes. These are represented with "**n**" as shown below::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81 Species_1 1 root superkingdom1 kingdom1 subkingdom1 superphylum1 phylum1 subphylum1 superclass1 class1 subclass1 superorder1 order1 suborder1 superfamily1 family1 subfamily1 tribe1 subtribe1 genus1 subgenus1 species1 subspecies1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82 Species_2 2 root superkingdom1 kingdom1 subkingdom1 superphylum1 phylum1 subphylum1 superclass1 class1 subclass1 superorder1 order1 suborder1 superfamily1 family1 subfamily1 tribe1 subtribe1 genus2 n species2 subspecies2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83 Species_3 3 root superkingdom1 kingdom1 subkingdom1 superphylum1 n subphylum3 superclass3 class3 subclass3 superorder3 order3 suborder3 superfamily3 family3 subfamily3 tribe3 subtribe3 genus3 subgenus3 species3 subspecies3
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84 Species_4 4 root superkingdom1 kingdom1 subkingdom1 superphylum1 phylum4 subphylum4 superclass4 class4 subclass4 superorder4 order4 suborder4 superfamily4 family4 subfamily4 tribe4 subtribe4 genus4 subgenus4 species4 subspecies4
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86 (here *phylum* for Species_3 and *subgenus* for Species_2 are unassigned)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88 A full tree for this dataset will look like this:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90 .. image:: ./static/images/t2ps_missing_nodes.png
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91 :width: 1000
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93 Missing nodes are simply omitted from the tree (there are no gray boxes corresponding to "n") but the branch length is maintained so that taxa belonging to the same taxonomic rank are always aligned with each other
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95 --------
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97 **Autoscaling the tree**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99 You can use the "*maximum number of leaves*" to restrict the tree to a specified number of leaves (external nodes). Using the following setting on the above dataset (note *show ranks from root to* set to *show entire tree* and *maximum number of leaves* is set *3*):
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101 .. image:: ./static/images/t2ps_autoscale.png
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103 will produce this tree:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
105 .. image:: ./static/images/t2ps_autoscale_tree.png
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
106 :width: 1000
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
107
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
108 Here the tree is automatically trimmed at a taxonomic rank that will only have 3 outer nodes. This is very useful for initial evaluation of very large trees where you want to only see, say, 1,000 outer nodes at once.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
109
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
110 -------
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
111
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
112 **Explanation of phylogenetic tree markup**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
113
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
114 Branches of the tree are colored according to the heatmap below. The "bluer" the branch the lesser the number of leaves it leads to and vice versa.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
115
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
116 .. image:: ./static/images/t2ps_heatmap.png
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
117
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
118 Each node is labeled with taxonomic name and the number of tree leaves belonging to this taxonomic group:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
119
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
120 .. image:: ./static/images/t2ps_node_label.png
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
121
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
122
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
123
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
124
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
125
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
126 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
127 </tool>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
128
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
129