annotate plot_cladogram.xml @ 0:e7cd19afda2e draft

Lefse
author george-weingart
date Tue, 13 May 2014 21:57:00 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
george-weingart
parents:
diff changeset
1 <tool id="LEfSe_cla" name="D) Plot Cladogram" version="1.0">
george-weingart
parents:
diff changeset
2 <description></description>
george-weingart
parents:
diff changeset
3 <command interpreter="python">plot_cladogram.py $inp_data $cladogram --title "$textm.title" --expand_void_lev $structural.expand_void_lev --max_lev $structural.max_lev --colored_label $graphical.colored_labels --labeled_start_lev $textm.labeled_start_lev --labeled_stop_lev $textm.labeled_stop_lev --abrv_start_lev $textm.abrv_start_lev --abrv_stop_lev $textm.abrv_stop_lev --radial_start_lev $graphical.radial_start_lev --max_point_size $graphical.max_point_size --min_point_size $graphical.min_point_size --point_edge_width $graphical.point_edge_width --siblings_connector_width $graphical.siblings_connector_width --parents_connector_width $graphical.parents_connector_width --alpha $graphical.alpha --clade_sep $graphical.clade_sep --title_font_size $textm.title_font_size --label_font_size $textm.label_font_size --class_legend_font_size $textm.class_legend_font_size --sub_clade "$structural.root" --background_color $graphical.background_color --format $for --right_space_prop $graphical.right_space_prop --left_space_prop 0.01 --dpi $dpi</command>
george-weingart
parents:
diff changeset
4 <inputs>
george-weingart
parents:
diff changeset
5 <page>
george-weingart
parents:
diff changeset
6 <param format="lefse_res" name="inp_data" type="data" label="Select data" help=""/>
george-weingart
parents:
diff changeset
7
george-weingart
parents:
diff changeset
8 <conditional name="structural">
george-weingart
parents:
diff changeset
9 <param name="structural_choice" type="select" label="Set structural parameters of the cladogram" help="">
george-weingart
parents:
diff changeset
10 <option value="d" selected='True'>Default</option>
george-weingart
parents:
diff changeset
11 <option value="a">Advanced</option>
george-weingart
parents:
diff changeset
12 </param>
george-weingart
parents:
diff changeset
13 <when value="d">
george-weingart
parents:
diff changeset
14 <param name="root" type="hidden" value=""/>
george-weingart
parents:
diff changeset
15 <param name="expand_void_lev" type="hidden" value="0"/>
george-weingart
parents:
diff changeset
16 <param name="max_lev" type="hidden" value="6"/>
george-weingart
parents:
diff changeset
17 </when>
george-weingart
parents:
diff changeset
18 <when value="a">
george-weingart
parents:
diff changeset
19 <param name="root" type="text" size="10" value="" label="Root of the tree (insert the full name of the clade separating the levels with '.', nothing means the highest level clade)"/>
george-weingart
parents:
diff changeset
20 <param name="expand_void_lev" type="select" label="Expand terminal non-leaf levels">
george-weingart
parents:
diff changeset
21 <option value="1" >Yes</option>
george-weingart
parents:
diff changeset
22 <option value="0" selected='True'>No</option>
george-weingart
parents:
diff changeset
23 </param>
george-weingart
parents:
diff changeset
24 <param name="max_lev" type="integer" size="2" value="6" label="Maximum number of taxonomic levels"/>
george-weingart
parents:
diff changeset
25 </when>
george-weingart
parents:
diff changeset
26 </conditional>
george-weingart
parents:
diff changeset
27
george-weingart
parents:
diff changeset
28 <conditional name="textm">
george-weingart
parents:
diff changeset
29 <param name="text_choice" type="select" label="Set text and label options (font size, abbreviations, ...)" help="">
george-weingart
parents:
diff changeset
30 <option value="d" selected='True'>Default</option>
george-weingart
parents:
diff changeset
31 <option value="a">Advanced</option>
george-weingart
parents:
diff changeset
32 </param>
george-weingart
parents:
diff changeset
33 <when value="d">
george-weingart
parents:
diff changeset
34 <param name="title" type="hidden" value=""/>
george-weingart
parents:
diff changeset
35 <param name="label_font_size" type="hidden" value="7"/>
george-weingart
parents:
diff changeset
36 <param name="title_font_size" type="hidden" value="14" />
george-weingart
parents:
diff changeset
37 <param name="class_legend_font_size" type="hidden" value="10"/>
george-weingart
parents:
diff changeset
38 <param name="labeled_start_lev" type="hidden" value="2"/>
george-weingart
parents:
diff changeset
39 <param name="labeled_stop_lev" type="hidden" value="6"/>
george-weingart
parents:
diff changeset
40 <param name="abrv_start_lev" type="hidden" value="4"/>
george-weingart
parents:
diff changeset
41 <param name="abrv_stop_lev" type="hidden" value="6"/>
george-weingart
parents:
diff changeset
42 </when>
george-weingart
parents:
diff changeset
43 <when value="a">
george-weingart
parents:
diff changeset
44 <param name="title" type="text" size="10" value="" label="The title of the cladogram"/>
george-weingart
parents:
diff changeset
45 <param name="title_font_size" type="integer" size="2" value="14" label="Title font size"/>
george-weingart
parents:
diff changeset
46 <param name="label_font_size" type="integer" size="2" value="7" label="Label font size"/>
george-weingart
parents:
diff changeset
47 <param name="class_legend_font_size" type="integer" size="2" value="10" label="Class font size"/>
george-weingart
parents:
diff changeset
48 <param name="labeled_start_lev" type="integer" size="2" value="2" label="Starting level for drawing the labels"/>
george-weingart
parents:
diff changeset
49 <param name="labeled_stop_lev" type="integer" size="2" value="6" label="Last level for drawing the labels"/>
george-weingart
parents:
diff changeset
50 <param name="abrv_start_lev" type="integer" size="2" value="4" label="First level for abbreviating the labels"/>
george-weingart
parents:
diff changeset
51 <param name="abrv_stop_lev" type="integer" size="2" value="6" label="Last level for abbreviating the labels"/>
george-weingart
parents:
diff changeset
52 </when>
george-weingart
parents:
diff changeset
53 </conditional>
george-weingart
parents:
diff changeset
54
george-weingart
parents:
diff changeset
55 <conditional name="graphical">
george-weingart
parents:
diff changeset
56 <param name="graphical_choice" type="select" label="Set some graphical options to personalize the output">
george-weingart
parents:
diff changeset
57 <option value="d" selected='True'>Default</option>
george-weingart
parents:
diff changeset
58 <option value="a">Advanced</option>
george-weingart
parents:
diff changeset
59 </param>
george-weingart
parents:
diff changeset
60 <when value="d">
george-weingart
parents:
diff changeset
61 <param name="radial_start_lev" type="hidden" value="1" />
george-weingart
parents:
diff changeset
62 <param name="max_point_size" type="hidden" value="7.0" />
george-weingart
parents:
diff changeset
63 <param name="min_point_size" type="hidden" value="1.5" />
george-weingart
parents:
diff changeset
64 <param name="point_edge_width" type="hidden" value="0.25" />
george-weingart
parents:
diff changeset
65 <param name="siblings_connector_width" type="hidden" value="2.0" />
george-weingart
parents:
diff changeset
66 <param name="parents_connector_width" type="hidden" value="0.8" />
george-weingart
parents:
diff changeset
67 <param name="alpha" type="hidden" value="0.2" />
george-weingart
parents:
diff changeset
68 <param name="clade_sep" type="hidden" value="1.5" />
george-weingart
parents:
diff changeset
69 <param name="for" type="hidden" value="png" />
george-weingart
parents:
diff changeset
70 <param name="right_space_prop" type="hidden" value="0.1"/>
george-weingart
parents:
diff changeset
71 <param name="colored_labels" type="hidden" value="0"/>
george-weingart
parents:
diff changeset
72 <param name="background_color" type="hidden" value="w"/>
george-weingart
parents:
diff changeset
73 </when>
george-weingart
parents:
diff changeset
74 <when value="a">
george-weingart
parents:
diff changeset
75 <param name="radial_start_lev" type="integer" size="2" value="1" label="Number of external levels drawn in the radial representation"/>
george-weingart
parents:
diff changeset
76 <param name="max_point_size" type="float" size="2" value="7.0" label="Max dimension of the circles representing taxa"/>
george-weingart
parents:
diff changeset
77 <param name="min_point_size" type="float" size="2" value="1.5" label="Min dimension of the circles representing taxa"/>
george-weingart
parents:
diff changeset
78 <param name="point_edge_width" type="float" size="2" value="0.25" label="Width of the edges of the circles representing taxa"/>
george-weingart
parents:
diff changeset
79 <param name="siblings_connector_width" type="float" size="2" value="2.0" label="Width of the lines connecting sibling taxa"/>
george-weingart
parents:
diff changeset
80 <param name="parents_connector_width" type="float" size="2" value="0.8" label="Width of the lines connecting parent with son taxa"/>
george-weingart
parents:
diff changeset
81 <param name="alpha" type="float" size="2" value="0.2" label="The alpha value for the transparency of clade labeling"/>
george-weingart
parents:
diff changeset
82 <param name="right_space_prop" type="float" size="2" value="0.1" label="Ration of the horizontal space to be given to the right side (for adjusting for label legend)"/>
george-weingart
parents:
diff changeset
83 <param name="colored_labels" type="select" label="Whether to write the labels with the class color or in black">
george-weingart
parents:
diff changeset
84 <option value="0" selected='True'>Black</option>
george-weingart
parents:
diff changeset
85 <option value="1">Class color</option>
george-weingart
parents:
diff changeset
86 </param>
george-weingart
parents:
diff changeset
87 <param name="background_color" type="select" label="Background color">
george-weingart
parents:
diff changeset
88 <option value="w" selected='True'>White</option>
george-weingart
parents:
diff changeset
89 <option value="k">Black</option>
george-weingart
parents:
diff changeset
90 </param>
george-weingart
parents:
diff changeset
91 <param name="clade_sep" type="float" size="2" value="1.5" label="Set the space between clades at the lower level"/>
george-weingart
parents:
diff changeset
92 </when>
george-weingart
parents:
diff changeset
93 </conditional>
george-weingart
parents:
diff changeset
94 <param name="for" type="select" label="Output format">
george-weingart
parents:
diff changeset
95 <option value="png" selected="png">png</option>
george-weingart
parents:
diff changeset
96 <option value="svg">svg</option>
george-weingart
parents:
diff changeset
97 <option value="pdf">pdf</option>
george-weingart
parents:
diff changeset
98 </param>
george-weingart
parents:
diff changeset
99 <param name="dpi" type="select" label="Set the dpi resolution of the output">
george-weingart
parents:
diff changeset
100 <option value="72">72</option>
george-weingart
parents:
diff changeset
101 <option value="150" selected="True">150</option>
george-weingart
parents:
diff changeset
102 <option value="300">300</option>
george-weingart
parents:
diff changeset
103 <option value="600">600</option>
george-weingart
parents:
diff changeset
104 <option value="1200">1200</option>
george-weingart
parents:
diff changeset
105 </param>
george-weingart
parents:
diff changeset
106
george-weingart
parents:
diff changeset
107 </page>
george-weingart
parents:
diff changeset
108 </inputs>
george-weingart
parents:
diff changeset
109 <outputs>
george-weingart
parents:
diff changeset
110 <data format="png" name="cladogram" >
george-weingart
parents:
diff changeset
111 <change_format>
george-weingart
parents:
diff changeset
112 <when input="for" value="svg" format="svg" />
george-weingart
parents:
diff changeset
113 <when input="for" value="pdf" format="pdf" />
george-weingart
parents:
diff changeset
114 </change_format>
george-weingart
parents:
diff changeset
115 </data>
george-weingart
parents:
diff changeset
116 </outputs>
george-weingart
parents:
diff changeset
117 <tests>
george-weingart
parents:
diff changeset
118 <test>
george-weingart
parents:
diff changeset
119 <param name="input1" value="13.bed" dbkey="hg18" ftype="bed"/>
george-weingart
parents:
diff changeset
120 <param name="maf_source" value="cached"/>
george-weingart
parents:
diff changeset
121 <param name="maf_identifier" value="17_WAY_MULTIZ_hg18"/>
george-weingart
parents:
diff changeset
122 <param name="species" value="hg18,mm8"/>
george-weingart
parents:
diff changeset
123 <param name="overwrite_with_gaps" value="True"/>
george-weingart
parents:
diff changeset
124 <output name="out_file1" file="interval_maf_to_merged_fasta_out3.fasta" />
george-weingart
parents:
diff changeset
125 </test>
george-weingart
parents:
diff changeset
126 <test>
george-weingart
parents:
diff changeset
127 <param name="input1" value="1.bed" dbkey="hg17" ftype="bed"/>
george-weingart
parents:
diff changeset
128 <param name="maf_source" value="cached"/>
george-weingart
parents:
diff changeset
129 <param name="maf_identifier" value="8_WAY_MULTIZ_hg17"/>
george-weingart
parents:
diff changeset
130 <param name="species" value="canFam1,hg17,mm5,panTro1,rn3"/>
george-weingart
parents:
diff changeset
131 <param name="overwrite_with_gaps" value="True"/>
george-weingart
parents:
diff changeset
132 <output name="out_file1" file="interval_maf_to_merged_fasta_out.dat" />
george-weingart
parents:
diff changeset
133 </test>
george-weingart
parents:
diff changeset
134 <test>
george-weingart
parents:
diff changeset
135 <param name="input1" value="1.bed" dbkey="hg17" ftype="bed"/>
george-weingart
parents:
diff changeset
136 <param name="maf_source" value="user"/>
george-weingart
parents:
diff changeset
137 <param name="maf_file" value="5.maf"/>
george-weingart
parents:
diff changeset
138 <param name="species" value="canFam1,hg17,mm5,panTro1,rn3"/>
george-weingart
parents:
diff changeset
139 <param name="overwrite_with_gaps" value="True"/>
george-weingart
parents:
diff changeset
140 <output name="out_file1" file="interval_maf_to_merged_fasta_user_out.dat" />
george-weingart
parents:
diff changeset
141 </test>
george-weingart
parents:
diff changeset
142 </tests>
george-weingart
parents:
diff changeset
143 <help>
george-weingart
parents:
diff changeset
144 **What it does**
george-weingart
parents:
diff changeset
145
george-weingart
parents:
diff changeset
146 This module produces cladograms representing the LEfSe results (obtained with the corresponding module) on the hierarchy induced by the label names (the levels of the tree must be denoted with "|" in the original input file). The module cannot be used for features that do not have a tree structure.
george-weingart
parents:
diff changeset
147
george-weingart
parents:
diff changeset
148 Below you can find a couple of examples.
george-weingart
parents:
diff changeset
149
george-weingart
parents:
diff changeset
150 ------
george-weingart
parents:
diff changeset
151
george-weingart
parents:
diff changeset
152 **Input format**
george-weingart
parents:
diff changeset
153
george-weingart
parents:
diff changeset
154 The module accepts the output of the LEfSe module.
george-weingart
parents:
diff changeset
155
george-weingart
parents:
diff changeset
156 ------
george-weingart
parents:
diff changeset
157
george-weingart
parents:
diff changeset
158 **Output format**
george-weingart
parents:
diff changeset
159
george-weingart
parents:
diff changeset
160 The module generate images in png, svg or pdf format. The png format is recommended for exploratory runs as it can be easily visualized internally in Galaxy, whereas the vectorial svg and pdf format are recommended for the final publication-ready image to be downloaded.
george-weingart
parents:
diff changeset
161
george-weingart
parents:
diff changeset
162 ------
george-weingart
parents:
diff changeset
163
george-weingart
parents:
diff changeset
164 **Parameters**
george-weingart
parents:
diff changeset
165
george-weingart
parents:
diff changeset
166 In addition to the output format and the dpi resolution three sets of parameters can be tuned: structural parameters affecting the property of the circular cladogram, text and label options for regulating the clade annotation and graphical options for personalizing the appearance of the plot. The default settings of the parameters should give satisfactory cladograms in the great majority of the cases.
george-weingart
parents:
diff changeset
167
george-weingart
parents:
diff changeset
168 **Advanced parameter settings**
george-weingart
parents:
diff changeset
169
george-weingart
parents:
diff changeset
170 *Structural parameters*
george-weingart
parents:
diff changeset
171 * Root of the tree: selects any taxa of the tree to be the root of the cladogram (only the clades below the root will be visualized). Taxa levels are separated by ".", so for, example, Bacteria.Firmicutes will generate only the cladogram of Firmicutes.
george-weingart
parents:
diff changeset
172 * Expand terminal non-leaf levels: whether to expand a non-leaf taxa without children up to the level of the leaves naming the new levels with the expanding taxa name.
george-weingart
parents:
diff changeset
173 * Maximum number of taxonomic levels: you can limit the levels of the cladogram to a desired level.
george-weingart
parents:
diff changeset
174 *Text and label options*
george-weingart
parents:
diff changeset
175 * The title of the cladogram: optional title for the plot (default is no title).
george-weingart
parents:
diff changeset
176 * Title font size: set the font size of the title only.
george-weingart
parents:
diff changeset
177 * Label font size: set the font size of the labels (and of the label legend) used in the cladogram to denote taxa.
george-weingart
parents:
diff changeset
178 * Class font size: set the font of the legend for the class names and colors.
george-weingart
parents:
diff changeset
179 * Starting level for drawing the labels: you can avoid naming the more internal clades if they are not informative.
george-weingart
parents:
diff changeset
180 * Last level for drawing the labels: you may want to remove the most external labels as they may be to dense or overlapping.
george-weingart
parents:
diff changeset
181 * First level for abbreviating the labels: set the starting level for substituting the full clade names with with an abbreviation supported by a legend table (recommended for the most external taxa).
george-weingart
parents:
diff changeset
182 * Last level for abbreviating the labels: set the more external level for substituting the full clade names with with an abbreviation supported by a legend table.
george-weingart
parents:
diff changeset
183 *Graphical options*
george-weingart
parents:
diff changeset
184 * Number of external levels drawn in the radial representation: the connection between the taxa in last level and the corresponding parent is represented with a straight edge. The same representation may be used for more internal levels as well.
george-weingart
parents:
diff changeset
185 * Max dimension of the circles representing taxa: the sizes of the taxa represent the highest logarithmic abundance between classes, and this option sets the maximum diameter of the graphical representation.
george-weingart
parents:
diff changeset
186 * Min dimension of the circles representing taxa: the taxon diameter of the smallest logarithmic taxa abundance.
george-weingart
parents:
diff changeset
187 * Width of the edges of the circles representing taxa: the taxon circles have an external border whose thickness is regulated by this option.
george-weingart
parents:
diff changeset
188 * Width of the lines connecting sibling taxa: set the thickness of the lines connecting sibling taxa in the non-radial representation.
george-weingart
parents:
diff changeset
189 * Width of the lines connecting parent with son taxa: set the line thickness of the child-parent connection both in radial and non-radial representation.
george-weingart
parents:
diff changeset
190 * The alpha value for the transparency of clade labeling: the alpha value is responsible for the transparency of the differential clade highlighting. Since the transparency is additive, the alpha value should not be higher than 1/s where s is the number of levels with differential clades.
george-weingart
parents:
diff changeset
191 * Ration of the horizontal space to be given to the right side: in case the label legend requires more space (because of long labels) you may increase the right panel increasing this value.
george-weingart
parents:
diff changeset
192 * Whether to write the labels with the class color or in black: set whether the clade names inside the cladogram will be displayed with the class color or in black.
george-weingart
parents:
diff changeset
193 * Background color: whether to generate plots with black or white backgrounds, adjusting properly the other colors.
george-weingart
parents:
diff changeset
194 * Set the space between clades at the lower level: set the separation between low-level taxa belonging to different super-clades. Depending on the density of the leaf-level this parameter is automatically adjusted.
george-weingart
parents:
diff changeset
195
george-weingart
parents:
diff changeset
196
george-weingart
parents:
diff changeset
197 ------
george-weingart
parents:
diff changeset
198
george-weingart
parents:
diff changeset
199 **Examples**
george-weingart
parents:
diff changeset
200
george-weingart
parents:
diff changeset
201 The dataset provided here_ and described in the "Introduction" module produces the following image (alpha values of LEfSe - step B - are set to 0.01)
george-weingart
parents:
diff changeset
202
george-weingart
parents:
diff changeset
203
george-weingart
parents:
diff changeset
204 .. _here: http://www.huttenhower.org/webfm_send/73
george-weingart
parents:
diff changeset
205
george-weingart
parents:
diff changeset
206 Focusing the cladogram on the Firmicutes phylum only and playing a bit with the graphical options, we can obtain the following plot:
george-weingart
parents:
diff changeset
207
george-weingart
parents:
diff changeset
208
george-weingart
parents:
diff changeset
209
george-weingart
parents:
diff changeset
210 </help>
george-weingart
parents:
diff changeset
211 </tool>