comparison home/ubuntu/lefse_to_export/plot_cladogram.xml @ 1:db64b6287cd6 draft

Modified datatypes
author george-weingart
date Wed, 20 Aug 2014 16:56:51 -0400
parents
children
comparison
equal deleted inserted replaced
0:e7cd19afda2e 1:db64b6287cd6
1 <tool id="LEfSe_cla" name="D) Plot Cladogram" version="1.0">
2 <description></description>
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>
4 <inputs>
5 <page>
6 <param format="lefse_internal_res" name="inp_data" type="data" label="Select data" help=""/>
7
8 <conditional name="structural">
9 <param name="structural_choice" type="select" label="Set structural parameters of the cladogram" help="">
10 <option value="d" selected='True'>Default</option>
11 <option value="a">Advanced</option>
12 </param>
13 <when value="d">
14 <param name="root" type="hidden" value=""/>
15 <param name="expand_void_lev" type="hidden" value="0"/>
16 <param name="max_lev" type="hidden" value="6"/>
17 </when>
18 <when value="a">
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)"/>
20 <param name="expand_void_lev" type="select" label="Expand terminal non-leaf levels">
21 <option value="1" >Yes</option>
22 <option value="0" selected='True'>No</option>
23 </param>
24 <param name="max_lev" type="integer" size="2" value="6" label="Maximum number of taxonomic levels"/>
25 </when>
26 </conditional>
27
28 <conditional name="textm">
29 <param name="text_choice" type="select" label="Set text and label options (font size, abbreviations, ...)" help="">
30 <option value="d" selected='True'>Default</option>
31 <option value="a">Advanced</option>
32 </param>
33 <when value="d">
34 <param name="title" type="hidden" value=""/>
35 <param name="label_font_size" type="hidden" value="7"/>
36 <param name="title_font_size" type="hidden" value="14" />
37 <param name="class_legend_font_size" type="hidden" value="10"/>
38 <param name="labeled_start_lev" type="hidden" value="2"/>
39 <param name="labeled_stop_lev" type="hidden" value="6"/>
40 <param name="abrv_start_lev" type="hidden" value="4"/>
41 <param name="abrv_stop_lev" type="hidden" value="6"/>
42 </when>
43 <when value="a">
44 <param name="title" type="text" size="10" value="" label="The title of the cladogram"/>
45 <param name="title_font_size" type="integer" size="2" value="14" label="Title font size"/>
46 <param name="label_font_size" type="integer" size="2" value="7" label="Label font size"/>
47 <param name="class_legend_font_size" type="integer" size="2" value="10" label="Class font size"/>
48 <param name="labeled_start_lev" type="integer" size="2" value="2" label="Starting level for drawing the labels"/>
49 <param name="labeled_stop_lev" type="integer" size="2" value="6" label="Last level for drawing the labels"/>
50 <param name="abrv_start_lev" type="integer" size="2" value="4" label="First level for abbreviating the labels"/>
51 <param name="abrv_stop_lev" type="integer" size="2" value="6" label="Last level for abbreviating the labels"/>
52 </when>
53 </conditional>
54
55 <conditional name="graphical">
56 <param name="graphical_choice" type="select" label="Set some graphical options to personalize the output">
57 <option value="d" selected='True'>Default</option>
58 <option value="a">Advanced</option>
59 </param>
60 <when value="d">
61 <param name="radial_start_lev" type="hidden" value="1" />
62 <param name="max_point_size" type="hidden" value="7.0" />
63 <param name="min_point_size" type="hidden" value="1.5" />
64 <param name="point_edge_width" type="hidden" value="0.25" />
65 <param name="siblings_connector_width" type="hidden" value="2.0" />
66 <param name="parents_connector_width" type="hidden" value="0.8" />
67 <param name="alpha" type="hidden" value="0.2" />
68 <param name="clade_sep" type="hidden" value="1.5" />
69 <param name="for" type="hidden" value="png" />
70 <param name="right_space_prop" type="hidden" value="0.1"/>
71 <param name="colored_labels" type="hidden" value="0"/>
72 <param name="background_color" type="hidden" value="w"/>
73 </when>
74 <when value="a">
75 <param name="radial_start_lev" type="integer" size="2" value="1" label="Number of external levels drawn in the radial representation"/>
76 <param name="max_point_size" type="float" size="2" value="7.0" label="Max dimension of the circles representing taxa"/>
77 <param name="min_point_size" type="float" size="2" value="1.5" label="Min dimension of the circles representing taxa"/>
78 <param name="point_edge_width" type="float" size="2" value="0.25" label="Width of the edges of the circles representing taxa"/>
79 <param name="siblings_connector_width" type="float" size="2" value="2.0" label="Width of the lines connecting sibling taxa"/>
80 <param name="parents_connector_width" type="float" size="2" value="0.8" label="Width of the lines connecting parent with son taxa"/>
81 <param name="alpha" type="float" size="2" value="0.2" label="The alpha value for the transparency of clade labeling"/>
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)"/>
83 <param name="colored_labels" type="select" label="Whether to write the labels with the class color or in black">
84 <option value="0" selected='True'>Black</option>
85 <option value="1">Class color</option>
86 </param>
87 <param name="background_color" type="select" label="Background color">
88 <option value="w" selected='True'>White</option>
89 <option value="k">Black</option>
90 </param>
91 <param name="clade_sep" type="float" size="2" value="1.5" label="Set the space between clades at the lower level"/>
92 </when>
93 </conditional>
94 <param name="for" type="select" label="Output format">
95 <option value="png" selected="png">png</option>
96 <option value="svg">svg</option>
97 <option value="pdf">pdf</option>
98 </param>
99 <param name="dpi" type="select" label="Set the dpi resolution of the output">
100 <option value="72">72</option>
101 <option value="150" selected="True">150</option>
102 <option value="300">300</option>
103 <option value="600">600</option>
104 <option value="1200">1200</option>
105 </param>
106
107 </page>
108 </inputs>
109 <outputs>
110 <data format="png" name="cladogram" >
111 <change_format>
112 <when input="for" value="svg" format="svg" />
113 <when input="for" value="pdf" format="pdf" />
114 </change_format>
115 </data>
116 </outputs>
117 <tests>
118 <test>
119 <param name="input1" value="13.bed" dbkey="hg18" ftype="bed"/>
120 <param name="maf_source" value="cached"/>
121 <param name="maf_identifier" value="17_WAY_MULTIZ_hg18"/>
122 <param name="species" value="hg18,mm8"/>
123 <param name="overwrite_with_gaps" value="True"/>
124 <output name="out_file1" file="interval_maf_to_merged_fasta_out3.fasta" />
125 </test>
126 <test>
127 <param name="input1" value="1.bed" dbkey="hg17" ftype="bed"/>
128 <param name="maf_source" value="cached"/>
129 <param name="maf_identifier" value="8_WAY_MULTIZ_hg17"/>
130 <param name="species" value="canFam1,hg17,mm5,panTro1,rn3"/>
131 <param name="overwrite_with_gaps" value="True"/>
132 <output name="out_file1" file="interval_maf_to_merged_fasta_out.dat" />
133 </test>
134 <test>
135 <param name="input1" value="1.bed" dbkey="hg17" ftype="bed"/>
136 <param name="maf_source" value="user"/>
137 <param name="maf_file" value="5.maf"/>
138 <param name="species" value="canFam1,hg17,mm5,panTro1,rn3"/>
139 <param name="overwrite_with_gaps" value="True"/>
140 <output name="out_file1" file="interval_maf_to_merged_fasta_user_out.dat" />
141 </test>
142 </tests>
143 <help>
144 **What it does**
145
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.
147
148 Below you can find a couple of examples.
149
150 ------
151
152 **Input format**
153
154 The module accepts the output of the LEfSe module.
155
156 ------
157
158 **Output format**
159
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.
161
162 ------
163
164 **Parameters**
165
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.
167
168 **Advanced parameter settings**
169
170 *Structural parameters*
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.
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.
173 * Maximum number of taxonomic levels: you can limit the levels of the cladogram to a desired level.
174 *Text and label options*
175 * The title of the cladogram: optional title for the plot (default is no title).
176 * Title font size: set the font size of the title only.
177 * Label font size: set the font size of the labels (and of the label legend) used in the cladogram to denote taxa.
178 * Class font size: set the font of the legend for the class names and colors.
179 * Starting level for drawing the labels: you can avoid naming the more internal clades if they are not informative.
180 * Last level for drawing the labels: you may want to remove the most external labels as they may be to dense or overlapping.
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).
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.
183 *Graphical options*
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.
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.
186 * Min dimension of the circles representing taxa: the taxon diameter of the smallest logarithmic taxa abundance.
187 * Width of the edges of the circles representing taxa: the taxon circles have an external border whose thickness is regulated by this option.
188 * Width of the lines connecting sibling taxa: set the thickness of the lines connecting sibling taxa in the non-radial representation.
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.
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.
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.
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.
193 * Background color: whether to generate plots with black or white backgrounds, adjusting properly the other colors.
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.
195
196
197 ------
198
199 **Examples**
200
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)
202
203
204 .. _here: http://www.huttenhower.org/webfm_send/73
205
206 Focusing the cladogram on the Firmicutes phylum only and playing a bit with the graphical options, we can obtain the following plot:
207
208
209
210 </help>
211 </tool>