comparison humann_barplot.xml @ 0:efd03b79029f draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/humann commit 6b06711cfba45855d5a992ed1c73c472eaef644f
author thanhlv
date Mon, 13 Feb 2023 16:16:12 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:efd03b79029f
1 <tool id="humann_barplot" name="Barplot" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" >
2 <description>stratified HUMAnN features</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="edam_ontology"/>
7 <expand macro="requirements"/>
8 <expand macro="version"/>
9 <command detect_errors="exit_code"><![CDATA[
10 humann_barplot
11 --input '$input'
12 #if str($last_metadata) != ''
13 --last-metadata '$last_metadata'
14 #end if
15 --focal-feature '$focal_feature'
16 --top-taxa $species.top_taxa
17 $species.as_genera
18 $species.exclude_unclassified
19 $species.remove_zeros
20 --sort $species.sort
21 #if str($species.taxa_colormap) != ''
22 --taxa-colormap '$species.taxa_colormap'
23 #end if
24
25 #if str($sample.focal_metadata) != ''
26 --focal-metadata '$sample.focal_metadata'
27 #end if
28 #if str($sample.meta_colormap) != ''
29 --meta-colormap '$sample.meta_colormap'
30 #end if
31 --max-metalevels $sample.max_metalevels
32 --scaling '$graphical.scaling'
33 #if str($graphical.ymin) and str($graphical.ymax) != ''
34 --ylims $graphical.ymin $graphical.ymax
35 #end if
36 $graphical.no_grid
37 --dimensions $graphical.height $graphical.width
38 #if str($graphical.units) != ''
39 --units '$graphical.units'
40 #end if
41 --legend-cols $legend.legend_cols
42 --legend-rows $legend.legend_rows
43 --legend-height $legend.legend_height
44 #if $out.format == 'png'
45 --output 'output.png'
46 #elif $out.format == 'pdf'
47 --output 'output.pdf'
48 #elif $out.format == 'svg'
49 --output 'output.svg'
50 #end if
51 ]]></command>
52 <inputs>
53 <param argument="--input" type="data" format="tsv,tabular" label="HUMAnN table with optional metadata"/>
54 <param argument="--last-metadata" type="text" value="" optional="true" label="The name (header) of the last row containing metadata, if any">
55 <sanitizer invalid_char="">
56 <valid initial="string.ascii_letters,string.digits">
57 <add value="_" />
58 <add value="-" />
59 </valid>
60 </sanitizer>
61 </param>
62 <param argument="--focal-feature" type="text" value="" label="Feature ID of interest" help="Give ID not full name">
63 <sanitizer invalid_char="">
64 <valid initial="string.ascii_letters,string.digits">
65 <add value="_" />
66 <add value="-" />
67 </valid>
68 </sanitizer>
69 <validator type="empty_field" />
70 </param>
71 <section name="species" title="Manipulation of species contributions" expanded="true">
72 <param argument="--top-taxa" type="integer" value="18" min="0" label="Max taxon stratifications"/>
73 <param argument="--as-genera" type="boolean" truevalue="--as-genera" falsevalue="" checked="false" label="Collapse species to genera?"/>
74 <param argument="--exclude-unclassified" type="boolean" truevalue="--exclude-unclassified" falsevalue="" checked="false" label="Do not include the 'unclassified' stratum?"/>
75 <param argument="--remove-zeros" type="boolean" truevalue="--remove-zeros" falsevalue="" checked="false" label="Do not plot samples with zero sum for this feature?"/>
76 <param argument="--sort" type="select" multiple="true" label="Sample sorting methods">
77 <option value="none">Default</option>
78 <option value="sum">Sum of stratified values</option>
79 <option value="dominant">Value of the most dominant stratification</option>
80 <option value="brawcurtis">Bray-Curtis agreement of relative stratifications</option>
81 <option value="braycurtis_w">Bray-Curtis agreement of raw stratifications</option>
82 <option value="metadata">Given metadata label</option>
83 </param>
84 <param argument="--taxa-colormap" type="text" value="" optional="true" label="Color space for taxa" help="Automatic if not provided">
85 <sanitizer invalid_char="">
86 <valid initial="string.ascii_letters,string.digits">
87 <add value="_" />
88 <add value="-" />
89 </valid>
90 </sanitizer>
91 </param>
92 </section>
93 <section name="sample" title="Sample metadata" expanded="true">
94 <param argument="--focal-metadata" type="text" value="" optional="true" label="Metadata to highlight">
95 <sanitizer invalid_char="">
96 <valid initial="string.ascii_letters,string.digits">
97 <add value="_" />
98 <add value="-" />
99 </valid>
100 </sanitizer>
101 </param>
102 <param argument="--max-metalevels" type="integer" value="7" min="0" label="Number of most frequent metadata to keep" help="Others will be collapsed"/>
103 <param argument="--meta-colormap" type="text" value="" optional="true" label="Color space for metadata levels" help="Automatic if not provided">
104 <sanitizer invalid_char="">
105 <valid initial="string.ascii_letters,string.digits">
106 <add value="_" />
107 <add value="-" />
108 </valid>
109 </sanitizer>
110 </param>
111 </section>
112 <section name="graphical" title="Graphical tweaks" expanded="true">
113 <param argument="--scaling" type="select" optional="true" label="Scaling options for total bar heights" help="Taxa are always proportional to height">
114 <option value="original">Plot original units</option>
115 <option value="logstack">Community totals (stacked bar peaks) are log10-scaled</option>
116 <option value="totalsum">Community totals (stacked bar peaks) are fixed at 1.0</option>
117 </param>
118 <param name="ymin" type="float" value="" optional="true" label="Minimum for y-axis"/>
119 <param name="ymax" type="float" value="" optional="true" label="Minimum for y-axis"/>
120 <param argument="--no-grid" type="boolean" truevalue="--no-grid" falsevalue="" checked="true" label="Don't plot y-axis grid lines?"/>
121 <param name="height" argument="--dimensions" type="float" value="11" label="Image height in inches"/>
122 <param name="width" argument="--dimensions" type="float" value="6" label="Image width in inches"/>
123 <param argument="--units" type="text" value="" label="Name of y-axis abundance units" help="Automatic if not provided">
124 <sanitizer invalid_char="">
125 <valid initial="string.ascii_letters,string.digits">
126 <add value="_" />
127 </valid>
128 </sanitizer>
129 </param>
130 </section>
131 <section name="legend" title="Legend layout" expanded="true">
132 <param argument="--legend-cols" type="integer" value="3" min="0" label="Number of legend columns"/>
133 <param argument="--legend-rows" type="integer" value="10" min="0" label="Number of legend rows"/>
134 <param argument="--legend-height" type="float" value="1.0" min="0" label="Ratio of legend to data axis height"/>
135 </section>
136 <section name="out" title="Outputs" expanded="true">
137 <param name="format" type="select" label="Format">
138 <option value="pdf">PDF</option>
139 <option value="png">PNG</option>
140 <option value="svg">SVG</option>
141 </param>
142 </section>
143 </inputs>
144 <outputs>
145 <data name="barplot_png" format="png" from_work_dir="output.png">
146 <filter>out['format'] == 'png'</filter>
147 </data>
148 <data name="barplot_pdf" format="pdf" from_work_dir="output.pdf">
149 <filter>out['format'] == 'pdf'</filter>
150 </data>
151 <data name="barplot_svg" format="svg" from_work_dir="output.svg">
152 <filter>out['format'] == 'svg'</filter>
153 </data>
154 </outputs>
155 <tests>
156 <test expect_num_outputs="1">
157 <param name="input" value="hmp_pathabund.txt"/>
158 <param name="last_metadata" value="STSite"/>
159 <param name="focal_feature" value="ANAGLYCOLYSIS-PWY"/>
160 <section name="species">
161 <param name="top_taxa" value="18"/>
162 <param name="as_genera" value="false"/>
163 <param name="exclude_unclassified" value="false"/>
164 <param name="remove_zeros" value="false"/>
165 <param name="sort" value="none"/>
166 </section>
167 <section name="sample">
168 <param name="focal_metadata" value="STSite"/>
169 <param name="max_metalevels" value="7"/>
170 </section>
171 <section name="graphical">
172 <param name="scaling" value="original"/>
173 <param name="no_grid" value="true"/>
174 <param name="height" value="8"/>
175 <param name="width" value="4"/>
176 </section>
177 <section name="legend">
178 <param name="legend_cols" value="3"/>
179 <param name="legend_rows" value="10"/>
180 <param name="legend_height" value="1.0"/>
181 </section>
182 <section name="out">
183 <param name="format" value="png"/>
184 </section>
185 <output name="barplot_png" file="barplot1.png" ftype="png" compare="sim_size"/>
186 </test>
187 <test expect_num_outputs="1">
188 <param name="input" value="hmp_pathabund.txt"/>
189 <param name="last_metadata" value="STSite"/>
190 <param name="focal_feature" value="ANAGLYCOLYSIS-PWY"/>
191 <section name="species">
192 <param name="top_taxa" value="18"/>
193 <param name="as_genera" value="false"/>
194 <param name="exclude_unclassified" value="false"/>
195 <param name="remove_zeros" value="false"/>
196 <param name="sort" value="sum"/>
197 </section>
198 <section name="sample">
199 <param name="focal_metadata" value="STSite"/>
200 <param name="max_metalevels" value="7"/>
201 </section>
202 <section name="graphical">
203 <param name="scaling" value="original"/>
204 <param name="no_grid" value="true"/>
205 <param name="height" value="8"/>
206 <param name="width" value="4"/>
207 </section>
208 <section name="legend">
209 <param name="legend_cols" value="3"/>
210 <param name="legend_rows" value="10"/>
211 <param name="legend_height" value="1.0"/>
212 </section>
213 <section name="out">
214 <param name="format" value="pdf"/>
215 </section>
216 <output name="barplot_pdf" file="barplot2.pdf" ftype="pdf" compare="sim_size"/>
217 </test>
218 <test expect_num_outputs="1">
219 <param name="input" value="hmp_pathabund.txt"/>
220 <param name="last_metadata" value="STSite"/>
221 <param name="focal_feature" value="ANAGLYCOLYSIS-PWY"/>
222 <section name="species">
223 <param name="top_taxa" value="18"/>
224 <param name="as_genera" value="true"/>
225 <param name="exclude_unclassified" value="true"/>
226 <param name="remove_zeros" value="true"/>
227 <param name="sort" value="sum"/>
228 </section>
229 <section name="sample">
230 <param name="focal_metadata" value="STSite"/>
231 <param name="max_metalevels" value="7"/>
232 </section>
233 <section name="graphical">
234 <param name="scaling" value="original"/>
235 <param name="no_grid" value="false"/>
236 <param name="height" value="8"/>
237 <param name="width" value="4"/>
238 </section>
239 <section name="legend">
240 <param name="legend_cols" value="3"/>
241 <param name="legend_rows" value="10"/>
242 <param name="legend_height" value="1.0"/>
243 </section>
244 <section name="out">
245 <param name="format" value="svg"/>
246 </section>
247 <output name="barplot_svg" file="barplot3.svg" ftype="svg" compare="sim_size"/>
248 </test>
249 <test expect_num_outputs="1">
250 <param name="input" value="hmp_pathabund.txt"/>
251 <param name="last_metadata" value="STSite"/>
252 <param name="focal_feature" value="ANAGLYCOLYSIS-PWY"/>
253 <section name="species">
254 <param name="top_taxa" value="12"/>
255 <param name="as_genera" value="false"/>
256 <param name="exclude_unclassified" value="false"/>
257 <param name="remove_zeros" value="false"/>
258 <param name="sort" value="sum"/>
259 </section>
260 <section name="sample">
261 <param name="focal_metadata" value="STSite"/>
262 <param name="max_metalevels" value="7"/>
263 </section>
264 <section name="graphical">
265 <param name="scaling" value="original"/>
266 <param name="no_grid" value="true"/>
267 <param name="height" value="8"/>
268 <param name="width" value="4"/>
269 </section>
270 <section name="legend">
271 <param name="legend_cols" value="3"/>
272 <param name="legend_rows" value="10"/>
273 <param name="legend_height" value="1.0"/>
274 </section>
275 <section name="out">
276 <param name="format" value="png"/>
277 </section>
278 <output name="barplot_png" file="barplot4.png" ftype="png" compare="sim_size"/>
279 </test>
280 </tests>
281 <help><![CDATA[
282 @HELP_HEADER@
283
284 This tool produces plots of stratified HUMAnN features and includes many options for sorting and scaling data
285
286 Here is an example of a HUMAnN barplot for a pathway (denitrification) that was preferentially enriched in Human Microbiome Project oral samples relative to other body sites.
287 This figure uses many options from humann_barplot, including regrouping by genus, pseudolog scaling, and sorting samples by similarity and metadata:
288
289 .. image:: $PATH_TO_IMAGES/731303924-page_DENITRIFICATION-PWY.png
290 :width: 800
291 ]]></help>
292 <expand macro="citations"/>
293 </tool>