comparison xml_intensity_check.xml @ 0:860907bf0e0f draft default tip

planemo upload for repository https://github.com/your_org_or_user/tools-metabolomics commit 3dd90b60510fa72eb8351464ec5d5883b0b6222a
author workflow4metabolomics
date Fri, 04 Jul 2025 16:31:19 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:860907bf0e0f
1 <tool id="intensity_check" name="Intensity Check" version="@TOOL_VERSION@" profile="22.05">
2 <description>Statistical measures, number of missing values and mean fold change</description>
3 <macros>
4 <token name="@TOOL_VERSION@">2.0.0</token>
5 </macros>
6
7 <edam_topics>
8 <edam_topic>topic_3172</edam_topic>
9 </edam_topics>
10 <edam_operations>
11 <edam_operation>operation_2428</edam_operation>
12 <edam_operation>operation_2428</edam_operation>
13 </edam_operations>
14
15 <requirements>
16 <requirement type="package" version="4">r-base</requirement>
17 <requirement type="package" version="2.2.5">r-argparse</requirement>
18 </requirements>
19
20 <required_files>
21 <include path="wrapper_intensity_check.R"/>
22 </required_files>
23
24 <command detect_errors="aggressive"><![CDATA[
25 Rscript '$__tool_directory__/wrapper_intensity_check.R'
26 --dataMatrix_in '$dataMatrix_in'
27 --sampleMetadata_in '$sampleMetadata_in'
28 --variableMetadata_in '$variableMetadata_in'
29 --method '${method_cond.method}'
30 --chosen_stat '${method_cond.chosen_stat}'
31 #if $method_cond.method == "each_class"
32 --class_col '${method_cond.class_col}'
33 --test_fold '${method_cond.test_fold_cond.test_fold}'
34 #if $method_cond.test_fold_cond.test_fold == "Yes"
35 --logarithm '${method_cond.test_fold_cond.logarithm}'
36 #end if
37 #end if
38 #if $method_cond.method == "one_class"
39 --class_col '${method_cond.class_col}'
40 --class1 '${method_cond.class1}'
41 --test_fold '${method_cond.test_fold_cond.test_fold}'
42 #if $method_cond.test_fold_cond.test_fold == "Yes"
43 --fold_frac '${method_cond.test_fold_cond.fold_frac}'
44 --logarithm '${method_cond.test_fold_cond.logarithm}'
45 #end if
46 #end if
47 --variableMetadata_out '$variableMetadata_out'
48 --graphs_out '$graphs_out'
49 ]]></command>
50
51 <inputs>
52 <param name="dataMatrix_in" type="data" format="tabular,tsv" label="Data matrix file"
53 help="Main data matrix. Rows are variables (features), columns are samples. The first column must contain variable identifiers, and the first row must contain sample identifiers." />
54 <param name="sampleMetadata_in" type="data" format="tabular,tsv" label="Sample metadata file"
55 help="Sample metadata table. Each row corresponds to a sample, and columns provide sample annotations (e.g., class, batch, group). The first column must contain sample identifiers matching the data matrix columns." />
56 <param name="variableMetadata_in" type="data" format="tabular,tsv" label="Variable metadata file"
57 help="Variable metadata table. Each row corresponds to a variable (feature), and columns provide variable annotations (e.g., m/z, retention time). The first column must contain variable identifiers matching the data matrix rows." />
58 <conditional name="method_cond">
59 <param name="method" type="select" label="Computation method"
60 help="Choose how to group samples for the calculation of statistics and fold changes.
61 • Without distinction between samples: All samples are treated as a single group.
62 • For each class of samples: Samples are grouped by a class column in the sample metadata.
63 • Between one class and all the remaining samples: Focus on one class versus all others.">
64 <option value="no_class">Without distinction between samples</option>
65 <option value="each_class">For each class of samples</option>
66 <option value="one_class">Between one class and all the remaining samples</option>
67 </param>
68 <when value="no_class">
69 <param name="chosen_stat" type="select" display="checkboxes" multiple="true" label="Statistics"
70 help="Select one or more statistics to calculate for each variable across all samples. At least one must be selected.">
71 <option value="mean">Mean</option>
72 <option value="sd">Standard deviation</option>
73 <option value="median">Median</option>
74 <option value="quartile">Quartile</option>
75 <option value="decile">Decile</option>
76 <option value="NA">Missing values</option>
77 <validator type="no_options" message="Please choose at least one statistic representation" />
78 </param>
79 </when>
80 <when value="each_class">
81 <param name="class_col" type="data_column" data_ref="sampleMetadata_in" use_header_names="true"
82 label="Class column"
83 help="Select the column in the sample metadata file that defines the sample classes (groups) for statistics and fold change calculations." />
84 <param name="chosen_stat" type="select" display="checkboxes" multiple="true" label="Statistics"
85 help="Select one or more statistics to calculate for each variable within each class. Leave blank if you only want to calculate mean fold change.">
86 <option value="mean">Mean</option>
87 <option value="sd">Standard deviation</option>
88 <option value="median">Median</option>
89 <option value="quartile">Quartile</option>
90 <option value="decile">Decile</option>
91 <option value="NA">Missing values</option>
92 </param>
93 <conditional name="test_fold_cond">
94 <param name="test_fold" type="select" display="radio" label="Calculate the mean fold change"
95 help="Select 'Yes' to calculate the mean fold change between all pairs of classes.">
96 <option value="Yes">Yes</option>
97 <option value="No" selected="true">No</option>
98 </param>
99 <when value="Yes">
100 <param name="logarithm" type="select" label="Logarithm"
101 help="Choose a logarithmic transformation for the mean fold change values.
102 • none: No transformation
103 • log2: Log2 transformation
104 • log10: Log10 transformation">
105 <option value="none" selected='true'>none</option>
106 <option value="log2">log2</option>
107 <option value="log10">log10</option>
108 </param>
109 </when>
110 <when value="No">
111 </when>
112 </conditional>
113 </when>
114 <when value="one_class">
115 <param name="class_col" type="data_column" data_ref="sampleMetadata_in" use_header_names="true"
116 label="Class column"
117 help="Select the column in the sample metadata file that defines the sample classes (groups). The selected class will be compared to all other samples." />
118 <param name="class1" type="text" label="Selected class"
119 help="Enter the name of the class to compare against all other samples. This class will be used as numerator or denominator in fold change calculations." />
120 <param name="chosen_stat" type="select" display="checkboxes" multiple="true" label="Statistics"
121 help="Select one or more statistics to calculate for the selected class and the remaining samples. Leave blank if you only want to calculate mean fold change.">
122 <option value="mean">Mean</option>
123 <option value="sd">Standard deviation</option>
124 <option value="median">Median</option>
125 <option value="quartile">Quartile</option>
126 <option value="decile">Decile</option>
127 <option value="NA">Missing values</option>
128 </param>
129 <conditional name="test_fold_cond">
130 <param name="test_fold" type="select" display="radio" label="Calculate the mean fold change"
131 help="Select 'Yes' to calculate the mean fold change between the selected class and all other samples.">
132 <option value="Yes">Yes</option>
133 <option value="No">No</option>
134 </param>
135 <when value="Yes">
136 <param name="fold_frac" type="select" label="Where should the class be placed for the mean fold change calculation?" display="radio"
137 help="Choose whether the selected class should be used as the numerator (Top) or denominator (Bottom) in the fold change calculation.">
138 <option value="Top">Numerator (Top)</option>
139 <option value="Bottom">Denominator (Bottom)</option>
140 </param>
141 <param name="logarithm" type="select" label="Logarithm"
142 help="Choose a logarithmic transformation for the mean fold change values.
143 • none: No transformation
144 • log2: Log2 transformation
145 • log10: Log10 transformation">
146 <option value="none">none</option>
147 <option value="log2">log2</option>
148 <option value="log10">log10</option>
149 </param>
150 </when>
151 <when value="No">
152 </when>
153 </conditional>
154 </when>
155 </conditional>
156 </inputs>
157
158 <outputs>
159 <data name="variableMetadata_out" format="tabular" label="IC_${variableMetadata_in.name}" />
160 <data name="graphs_out" format="pdf" label="IC_Graphs" />
161 </outputs>
162
163 <tests>
164 <test>
165 <param name="dataMatrix_in" value="ic_in_dataMatrix.tabular" />
166 <param name="sampleMetadata_in" value="ic_in_sampleMetadata.tabular" />
167 <param name="variableMetadata_in" value="ic_in_variableMetadata.tabular" />
168 <conditional name="method_cond">
169 <param name="method" value="no_class" />
170 <param name="chosen_stat" value="mean,sd,median,quartile,decile,NA" />
171 </conditional>
172 <output name="variableMetadata_out" value="ic_out_variableMetadata.tabular" />
173 <output name="graphs_out" value="ic_out_graphs.pdf" />
174 </test>
175 <test>
176 <param name="dataMatrix_in" value="ic_in_dataMatrix.tabular" />
177 <param name="sampleMetadata_in" value="ic_in_sampleMetadata.tabular" />
178 <param name="variableMetadata_in" value="ic_in_variableMetadata.tabular" />
179 <conditional name="method_cond">
180 <param name="chosen_stat" value="mean,sd,median,quartile,decile,NA" />
181 <param name="method" value="each_class" />
182 <param name="class_col" value="2" />
183 </conditional>
184 <output name="variableMetadata_out" value="ic_out_variableMetadata_classes.tabular" />
185 <output name="graphs_out" value="ic_out_graphs_classes.pdf" />
186 </test>
187 </tests>
188
189 <help><![CDATA[
190
191 .. class:: infomark
192
193 **Author:**
194 Anthony Fernandes for original code (PFEM - INRA)
195 **Maintainer:** Melanie Petera (PFEM - INRAE - MetaboHUB)
196
197 ---------------------------------------------------
198
199 ====================
200 Intensity Check
201 ====================
202
203 -----------
204 Description
205 -----------
206
207 This tool performs various metrics: mean fold change calculation, number and proportion of missing values, and mean, sd and decile calculation.
208 You can choose to perform these metrics according to sample groups defined in the sample metadata file given as input.
209
210 -----------------
211 Workflow position
212 -----------------
213
214 .. image:: int_check.png
215 :width: 800
216
217 -----------
218 Input files
219 -----------
220
221 +----------------------------+------------+
222 | Parameter | Format |
223 +============================+============+
224 | 1 : Data matrix file | tabular |
225 +----------------------------+------------+
226 | 2 : Sample metadata file | tabular |
227 +----------------------------+------------+
228 | 3 : Variable metadata file | tabular |
229 +----------------------------+------------+
230
231 ----------
232
233 Parameters
234 ----------
235
236 **Computation method**
237 - **Without distinction between samples:** calculates chosen statistic(s) for each variable.
238 - **For each class of samples:** separates samples between each class (class column to be specified). Chosen statistic(s) and/or mean fold change are calculated for each of them.
239 - **Between one class versus all the remaining samples:** If you want to focus only on one class versus all the remaining samples without class distinction.
240
241 In the case of two classes: "each class" and "one class" give the same results for statistical measures. We recommend to choose "one class" for mean fold change calculation in order to select the class you want to put as numerator or denominator (see below).
242
243 **Statistics**
244 Select the statistical measures you want to add in the variable metadata table. If the method is "each class" or "one class", you can choose to leave this section blank if you only want to calculate the mean fold change (see below).
245
246 **Class column** (*only if "each class" or "one class"*)
247 Select the class column in sample metadata table.
248
249 **Selected class** (*only if "one class"*)
250 If the method is "one class", specify it. Remaining samples will be named "Other".
251
252 **Calculate the mean fold change** (*only if "each class" or "one class"*)
253 Choose if you want to calculate the mean fold change. If the method is "each class": mean fold change will be calculated for all combinations of classes. If the method is "one class": it will be calculated between the selected class (see above) and the remaining samples.
254
255 **Where should the class be placed for the mean fold change calculation?** (*only if "one class"*)
256 If the method is "one class", choose "top" or "bottom" to put the selected class as numerator or denominator (respectively) for the mean fold change calculation.
257
258 **Logarithm** (*only if "each class" or "one class"*)
259 Choose if you want to transform the mean fold change with a log2 or log10.
260
261 ------------
262 Output files
263 ------------
264
265 **Variable metadata file**
266 Contains the previous columns in variable metadata file and the new ones.
267 In the column names for fold, the first class specified is the one used as numerator in the ratio.
268
269 **Graphs file**
270 Contains barplots with the proportion of NA considering classes and boxplots with the fold values.
271
272 ---------------------------------------------------
273
274 ----------------------
275 Additional information
276 ----------------------
277
278 .. class:: warningmark
279
280 For more information about input files, refer to the corresponding "W4M HowTo" page:
281 `W4M table format for Galaxy <https://nextcloud.inrae.fr/s/qLkNZRf84QQ5YLY>`_
282
283 ]]></help>
284 <citations>
285 <citation type="doi">10.1002/cpz1.70095</citation>
286 </citations>
287 </tool>