annotate home/ubuntu/lefse_to_export/plot_res.xml @ 2:a31c10fe09c8 draft default tip

Fixed bug due to numerical approximation after normalization affecting root-level clades (e.g. "Bacteria" or "Archaea")
author george-weingart
date Tue, 07 Jul 2015 13:52:29 -0400
parents db64b6287cd6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
1 <tool id="LEfSe_res" name="C) Plot LEfSe Results" version="1.0">
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
2 <description></description>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
3 <command interpreter="python">./plot_res.py $inp_data $res --title "$textm.title" --subclades $textm.subclades --title_font_size $textm.title_font_size --max_feature_len $textm.max_f_len --feature_font_size $textm.feature_font_size --class_legend_font_size $textm.class_legend_font_size --width $graphical.width --format $for --dpi $dpi --left_space $graphical.left_space_prop --right_space $graphical.right_space_prop --background_color $graphical.background_color</command>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
4 <inputs>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
5 <page>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
6 <param format="lefse_internal_res" name="inp_data" type="data" label="Select data" help=""/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
7
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
8 <conditional name="textm">
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
9 <param name="text_choice" type="select" label="Set text and label options (font size, abbreviations, ...)" help="">
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
10 <option value="d" selected='True'>Default</option>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
11 <option value="a">Advanced</option>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
12 </param>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
13 <when value="d">
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
14 <param name="title" type="hidden" value=""/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
15 <param name="title_font_size" type="hidden" value="14"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
16 <param name="feature_font_size" type="hidden" value="7" />
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
17 <param name="class_legend_font_size" type="hidden" value="10" />
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
18 <param name="subclades" type="hidden" value="1" />
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
19 <param name="max_f_len" type="hidden" value="60" />
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
20 </when>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
21 <when value="a">
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
22 <param name="title" type="text" size="10" value="" label="The title of the cladogram"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
23 <param name="subclades" type="integer" size="2" value="1" label="Number of label levels to be displayed (-1 means all)"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
24 <param name="max_f_len" type="integer" size="2" value="60" label="Maximum length of feature names "/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
25 <param name="title_font_size" type="integer" size="2" value="14" label="Title font size"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
26 <param name="feature_font_size" type="integer" size="2" value="7" label="Label font size"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
27 <param name="class_legend_font_size" type="integer" size="2" value="10" label="Class font size"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
28 </when>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
29 </conditional>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
30
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
31 <conditional name="graphical">
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
32 <param name="text_choice" type="select" label="Set some graphical options to personalize the output" help="">
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
33 <option value="d" selected='True'>Default</option>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
34 <option value="a">Advanced</option>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
35 </param>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
36 <when value="d">
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
37 <param name="width" type="hidden" value="7.0" />
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
38 <param name="left_space_prop" type="hidden" value="0.2" />
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
39 <param name="right_space_prop" type="hidden" value="0.1" />
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
40 <param name="background_color" type="hidden" value="w"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
41 </when>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
42 <when value="a">
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
43 <param name="width" type="float" size="2" value="7.0" label="Width of the plot"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
44 <param name="left_space_prop" type="float" size="2" value="0.2" label="Fraction of the total width to be reserved for the space at the left of the plot "/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
45 <param name="right_space_prop" type="float" size="2" value="0.1" label="Fraction of the total width to be reserved for the space at the right of the plot "/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
46 <param name="background_color" type="select" label="Whether to optimize the colors for a white or black background">
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
47 <option value="w" selected='True'>White</option>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
48 <option value="k">Black</option>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
49 </param>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
50
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
51 </when>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
52 </conditional>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
53
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
54
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
55
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
56 <param name="for" type="select" label="Output format">
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
57 <option value="png" selected="png">png</option>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
58 <option value="svg">svg</option>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
59 <option value="pdf">pdf</option>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
60 </param>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
61 <param name="dpi" type="select" label="Set the dpi resolution of the output">
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
62 <option value="72">72</option>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
63 <option value="150" selected="True">150</option>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
64 <option value="300">300</option>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
65 <option value="600">600</option>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
66 <option value="1200">1200</option>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
67 </param>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
68
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
69 </page>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
70 </inputs>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
71 <outputs>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
72 <data format="png" name="res" >
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
73 <change_format>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
74 <when input="for" value="svg" format="svg" />
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
75 </change_format>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
76 </data>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
77 </outputs>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
78 <tests>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
79 <test>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
80 <param name="input1" value="13.bed" dbkey="hg18" ftype="bed"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
81 <param name="maf_source" value="cached"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
82 <param name="maf_identifier" value="17_WAY_MULTIZ_hg18"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
83 <param name="species" value="hg18,mm8"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
84 <param name="overwrite_with_gaps" value="True"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
85 <output name="out_file1" file="interval_maf_to_merged_fasta_out3.fasta" />
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
86 </test>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
87 <test>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
88 <param name="input1" value="1.bed" dbkey="hg17" ftype="bed"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
89 <param name="maf_source" value="cached"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
90 <param name="maf_identifier" value="8_WAY_MULTIZ_hg17"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
91 <param name="species" value="canFam1,hg17,mm5,panTro1,rn3"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
92 <param name="overwrite_with_gaps" value="True"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
93 <output name="out_file1" file="interval_maf_to_merged_fasta_out.dat" />
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
94 </test>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
95 <test>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
96 <param name="input1" value="1.bed" dbkey="hg17" ftype="bed"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
97 <param name="maf_source" value="user"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
98 <param name="maf_file" value="5.maf"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
99 <param name="species" value="canFam1,hg17,mm5,panTro1,rn3"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
100 <param name="overwrite_with_gaps" value="True"/>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
101 <output name="out_file1" file="interval_maf_to_merged_fasta_user_out.dat" />
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
102 </test>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
103 </tests>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
104 <help>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
105 **What it does**
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
106
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
107 This module plots the biomarkers found by LEfSe ranking them accordingly to their effect size and associating them with the class with the highest median.
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
108
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
109 ------
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
110
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
111 **Input format**
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
112
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
113 The module accepts the output of the LEfSe module (B) only.
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
114
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
115 ------
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
116
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
117 **Output format**
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
118
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
119 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 formats are recommended for the final publication-ready image to be downloaded.
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
120
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
121 ------
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
122
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
123 **Parameters**
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
124
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
125 In addition to the output format and the dpi resolution two sets of parameters can be tuned: text and label options for regulating the plot annotation and graphical options for personalizing the appearance of the plot. The default settings of the parameters should give satisfactory outputs in the great majority of the cases.
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
126
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
127 **Advanced parameter settings**
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
128
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
129 *Text and label options*
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
130 * The title of the cladogram: optional title for the plot (default is no title).
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
131 * Number of label levels to be displayed: when dealing with hierarchical features this option sets the level to be displayed in the labels (-1 means the last level only, 1 means the highest level, 2 means the first two levels and so on).
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
132 * Maximum length of feature names: set the length of the feature names above which the names will be abbreviated (in the middle of the string).
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
133 * Title font size: set the font size of the title only.
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
134 * Label font size: set the font size of the labels (and of the label legend) used in the cladogram to denote taxa.
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
135 * Class font size: set the font of the legend for the class names and colors.
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
136 *Graphical options*
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
137 * Width of the plot: set the inches for the width of the plot (the height is automatically set based on the number of biomarkers to be displayed).
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
138 * Fraction of the total width to be reserved for the space at the left of the plot: this option permits the user to enlarge the space on the left of the plot for the cases in which the feature labels are long and need more space.
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
139 * Fraction of the total width to be reserved for the space at the right of the plot: this option permits the user to enlarge the space on the right of the plot for the cases in which the feature labels are long and need more space.
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
140 * Whether to optimize the colors for a white or black background: this option permits the user to generate output plots with black backgrounds, adjusting properly the colors of the cladogram.
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
141
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
142
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
143 ------
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
144
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
145 **Example**
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
146
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
147 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)
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
148
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
149 .. image:: ../galaxy/static/images/plot_res_ex.png
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
150 .. _here: http://www.huttenhower.org/webfm_send/73
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
151
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
152
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
153
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
154
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
155 </help>
db64b6287cd6 Modified datatypes
george-weingart
parents:
diff changeset
156 </tool>