comparison w4mcorcov.xml @ 0:23f9fad4edfc draft

planemo upload for repository https://github.com/HegemanLab/w4mcorcov_galaxy_wrapper/tree/master commit bd26542b811de06c1a877337a2840a9f899c2b94
author eschen42
date Mon, 16 Oct 2017 14:56:52 -0400
parents
children 0c2ad44b6c9c
comparison
equal deleted inserted replaced
-1:000000000000 0:23f9fad4edfc
1 <tool id="w4mcorcov" name="OPLS-DA_Contrasts" version="0.98.2">
2
3 <description>OPLS-DA Contrasts of Univariate Results</description>
4
5 <requirements>
6 <requirement type="package">r-batch</requirement>
7 <requirement type="package">bioconductor-ropls</requirement>
8 <!-- <requirement type="package">r-foreach</requirement> -->
9 </requirements>
10
11 <stdio>
12 <exit_code range="1:" level="fatal" />
13 </stdio>
14
15 <command><![CDATA[
16 cd $__tool_directory__; Rscript w4mcorcov_wrapper.R
17 dataMatrix_in "$dataMatrix_in"
18 sampleMetadata_in "$sampleMetadata_in"
19 variableMetadata_in "$variableMetadata_in"
20 tesC "$tesC"
21 facC "$facC"
22 pairSigFeatOnly "$pairSigFeatOnly"
23 levCSV '$levCSV'
24 matchingC '$matchingC'
25 labelFeatures '$labelFeatures'
26 contrast_detail '$contrast_detail'
27 contrast_corcov '$contrast_corcov'
28 contrast_salience '$contrast_salience'
29 ]]></command>
30
31 <inputs>
32 <param name="dataMatrix_in" label="Data matrix file" type="data" format="tabular" help="Features x samples (tabular data - decimal: '.'; missing: NA; mode: numerical; separator: tab character)" />
33 <param name="sampleMetadata_in" label="Sample metadata file" type="data" format="tabular" help="Samples x metadata (tabular data - decimal: '.'; missing: NA; mode: character or numerical; separator: tab character)" />
34 <param name="variableMetadata_in" label="Variable metadata file (from Univariate)" type="data" format="tabular" help="Features x metadata (tabular data - decimal: '.'; missing: NA; mode: character or numerical; separator: tab character)" />
35 <param name="facC" label="Factor of interest" type="text" help="The name of the column of sampleMetadata corresponding to the qualitative variable used to define the contrasts. This also must be a portion of the column names in the variableMetadata file except when the 'Univariate Significance-test' is set to 'none'."/>
36 <param name="tesC" label="Univariate Significance-Test" type="select" help="Either 'none' or the name of the statistical test that was run by the 'Univariate' tool to produce the variableMetadata file; that name must also be a portion of the column names in that file">
37 <option value="none">none - Display all features from variableMetadata (rather than choosing a subset based on significance in univariate testing)</option>
38 <option value="ttest">ttest - Student's t-test (parametric test, qualitative factor with exactly 2 levels)</option>
39 <option value="anova">anova - Analysis of variance (parametric test, qualitative factor with more than 2 levels)</option>
40 <option value="wilcoxon">wilcoxon - Wilcoxon rank test (nonparametric test, qualitative factor with exactly 2 levels)</option>
41 <option value="kruskal">kruskal - Kruskal-Wallis rank test (nonparametric test, qualitative factor with more than 2 levels)</option>
42 </param>
43 <param
44 name="pairSigFeatOnly"
45 type="boolean"
46 checked="true"
47 truevalue="TRUE"
48 falsevalue="FALSE"
49 label="Retain only pairwise-significant features"
50 help="Ignored when 'none' is chosen. Otherwise, when 'Yes', analyze only features that differ significantly for the pair of levels being contrasted; when 'No', include any feature that varies significantly across all levels."/>
51 <param name="levCSV" label="Levels of interest" type="text" value = "" help="Comma-separated level-names (or comma-less regular expressions to match level-names) to consider in analysis; must match at least two levels; may include wild cards or regular expressions">
52 <sanitizer>
53 <valid initial="string.letters">
54 <add preset="string.digits"/>
55 <add value="&#36;" /> <!-- $ dollar, dollar-sign -->
56 <add value="&#40;" /> <!-- ( left-paren -->
57 <add value="&#41;" /> <!-- ) right-paren -->
58 <add value="&#42;" /> <!-- * splat, asterisk -->
59 <add value="&#43;" /> <!-- + plus -->
60 <add value="&#44;" /> <!-- , comma -->
61 <add value="&#45;" /> <!-- - dash, minus-sign -->
62 <add value="&#46;" /> <!-- . dot, period -->
63 <add value="&#58;" /> <!-- : colon -->
64 <add value="&#59;" /> <!-- ; semi, semicolon -->
65 <add value="&#63;" /> <!-- ? what, question mark -->
66 <add value="&#91;" /> <!-- [ l-squib, left-squre-bracket -->
67 <add value="&#92;" /> <!-- \ whack, backslash -->
68 <add value="&#93;" /> <!-- ] r-squib, right-squre-bracket -->
69 <add value="&#94;" /> <!-- ^ hat, caret -->
70 <add value="&#123;" /> <!-- { l-cube, left-curly-bracket -->
71 <add value="&#124;" /> <!-- | pipe -->
72 <add value="&#125;" /> <!-- } r-cube, right-curly-bracket -->
73 <!-- IMPORTANT - Note that single and double quotes are not part of this list; they have the potential to make the 'command' section insecure or broken. -->
74 </valid>
75 </sanitizer>
76 </param>
77 <param name="matchingC" label="Level-name matching" type="select" help="How to specify levels generically">
78 <option value="none" selected="true">do no generic matching (default)</option>
79 <option value="wildcard">use wild-cards for matching level-names</option>
80 <option value="regex">use regular expressions for matching level-names</option>
81 </param>
82 <param name="labelFeatures" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Label features on detail plot" help="When true, add feature labels to points on the covariance-versus-correlation plot."/>
83 </inputs>
84
85 <outputs>
86 <!--
87 pdf1: summaries of each contrasts, clearly labeled by level=pair name
88 * first PCA score-plot
89 * then PLS score-plot
90 * then PLS S-PLOT; color in red features with VIP > 1; color in grey any non-pairwise-significant features, if these are included
91 -->
92 <data name="contrast_detail" label="${tool.name}_${variableMetadata_in.name}_detail" format="pdf" />
93 <!--
94 tsv1: cor and cov table with columns:
95 * feature-ID
96 * factor-level 1
97 * factor-level 2, lexically greater than level 1
98 * Wiklund_2008 correlation
99 * Wiklund_2008 covariance
100 * Galindo_Prieto_2014 VIP for predictive components, VIP[4,p]
101 * Galindo_Prieto_2014 VIP for orthogonal components, VIP[4,o]
102 * (When filtering on significance of univariate tests) Significance of test of null hypothesis that there is no difference between the two classes, i.e, the pair-wise test.
103 -->
104 <data name="contrast_corcov" label="${tool.name}_${variableMetadata_in.name}_corcov" format="tabular" />
105 <!--
106 tsv2: salience table with columns (experimental feature):
107 * feature-ID
108 * Salient level, i.e., for the feature, the class-level having the greatest median intensity
109 * Salient robust coefficient of variation, i.e., for the feature, the mean absolute deviation of the intensity for the salient level divided by the median intensity for the salient level
110 * Salience, i.e., for the feature, the median of the class-level having the greatest intensity divided by the mean of the medians for all class-levels.
111 -->
112 <data name="contrast_salience" label="${tool.name}_${variableMetadata_in.name}_salience" format="tabular" />
113 </outputs>
114
115 <tests>
116 <test>
117 <param name="dataMatrix_in" value="input_dataMatrix.tsv"/>
118 <param name="sampleMetadata_in" value="input_sampleMetadata.tsv"/>
119 <param name="variableMetadata_in" value="input_variableMetadata.tsv"/>
120 <param name="tesC" value="kruskal"/>
121 <param name="facC" value="k10"/>
122 <param name="pairSigFeatOnly" value="FALSE"/>
123 <param name="labelFeatures" value="TRUE"/>
124 <param name="levCSV" value="k[12],k[3-4]"/>
125 <param name="matchingC" value="regex"/>
126 <output name="contrast_corcov">
127 <assert_contents>
128 <!-- column-labels line -->
129 <has_text text="featureID" />
130 <has_text text="factorLevel1" />
131 <has_text text="factorLevel2" />
132 <has_text text="correlation" />
133 <has_text text="covariance" />
134 <has_text text="vip4p" />
135 <has_text text="vip4o" />
136 <has_text text="level1Level2Sig" />
137 <!-- first matched line -->
138 <has_text text="M349.2383T700" />
139 <has_text text="-0.05007" />
140 <has_text text="-5.8455" />
141 <has_text text="0.0961269" />
142 <has_text text="0.1848301" />
143 <!-- second matched line -->
144 <has_text text="M207.9308T206" />
145 <has_text text="-0.2967565" />
146 <has_text text="-19.56942" />
147 <has_text text="1.6023" />
148 <has_text text="1.35368" />
149 <!-- third matched line -->
150 <has_text text="M211.0607T263" />
151 <has_text text="0.47052" />
152 <has_text text="15.910087" />
153 <has_text text="0.89838" />
154 <has_text text="0.125372" />
155 </assert_contents>
156 </output>
157 <output name="contrast_salience">
158 <assert_contents>
159 <!-- column-labels line -->
160 <has_text text="featureID" />
161 <has_text text="salientLevel" />
162 <has_text text="salientRCV" />
163 <has_text text="salience" />
164 <!-- first matched line -->
165 <has_text text="M349.2383T700" />
166 <has_text text="0.659554" />
167 <has_text text="8.81866595" />
168 <!-- second matched line -->
169 <has_text text="M207.9308T206" />
170 <has_text text="0.0578578" />
171 <has_text text="2.27527985" />
172 <!-- third matched line -->
173 <has_text text="M211.0607T263" />
174 <has_text text="9999" />
175 <has_text text="12.87766096" />
176 </assert_contents>
177 </output>
178 </test>
179 <test>
180 <param name="dataMatrix_in" value="input_dataMatrix.tsv"/>
181 <param name="sampleMetadata_in" value="input_sampleMetadata.tsv"/>
182 <param name="variableMetadata_in" value="input_variableMetadata.tsv"/>
183 <param name="tesC" value="kruskal"/>
184 <param name="facC" value="k10"/>
185 <param name="pairSigFeatOnly" value="TRUE"/>
186 <param name="labelFeatures" value="TRUE"/>
187 <param name="levCSV" value="k[12],k[3-4]"/>
188 <param name="matchingC" value="regex"/>
189 <output name="contrast_corcov">
190 <assert_contents>
191 <!-- column-labels line -->
192 <has_text text="featureID" />
193 <has_text text="factorLevel1" />
194 <has_text text="factorLevel2" />
195 <has_text text="correlation" />
196 <has_text text="covariance" />
197 <has_text text="vip4p" />
198 <has_text text="vip4o" />
199 <has_text text="level1Level2Sig" />
200 <!-- first matched line -->
201 <has_text text="M349.2383T700" />
202 <has_text text="-0.99601577" />
203 <has_text text="-947.55795176" />
204 <!-- second matched line -->
205 <has_text text="M207.9308T206" />
206 <has_text text="0.688549" />
207 <has_text text="58.22352" />
208 <has_text text="1.394687" />
209 <has_text text="0.06049885" />
210 <!-- third matched line -->
211 <has_text text="M211.0607T263" />
212 <has_text text="-0.572018" />
213 <has_text text="-14.57769" />
214 <has_text text="0.7780899" />
215 <has_text text="0.3678166776" />
216 </assert_contents>
217 </output>
218 <output name="contrast_salience">
219 <assert_contents>
220 <!-- column-labels line -->
221 <has_text text="featureID" />
222 <has_text text="salientLevel" />
223 <has_text text="salientRCV" />
224 <has_text text="salience" />
225 <!-- first matched line -->
226 <has_text text="M349.2383T700" />
227 <has_text text="0.659554" />
228 <has_text text="8.81866595" />
229 <!-- second matched line -->
230 <has_text text="M207.9308T206" />
231 <has_text text="0.0578578" />
232 <has_text text="2.27527985" />
233 <!-- third matched line -->
234 <has_text text="M211.0607T263" />
235 <has_text text="9999" />
236 <has_text text="12.87766096" />
237 </assert_contents>
238 </output>
239 </test>
240 <test>
241 <param name="dataMatrix_in" value="input_dataMatrix.tsv"/>
242 <param name="sampleMetadata_in" value="input_sampleMetadata.tsv"/>
243 <param name="variableMetadata_in" value="input_variableMetadata.tsv"/>
244 <param name="tesC" value="none"/>
245 <param name="facC" value="k10"/>
246 <param name="pairSigFeatOnly" value="TRUE"/>
247 <param name="labelFeatures" value="FALSE"/>
248 <param name="levCSV" value="k[12],k[3-4]"/>
249 <param name="matchingC" value="regex"/>
250 <output name="contrast_corcov">
251 <assert_contents>
252 <!-- column-labels line -->
253 <has_text text="featureID" />
254 <has_text text="factorLevel1" />
255 <has_text text="factorLevel2" />
256 <has_text text="correlation" />
257 <has_text text="covariance" />
258 <has_text text="vip4p" />
259 <has_text text="vip4o" />
260 <!-- first matched line -->
261 <has_text text="M349.2383T700" />
262 <has_text text="-0.64331257" />
263 <has_text text="-161.82220" />
264 <has_text text="1.862455" />
265 <has_text text="0.2105143" />
266 <!-- second matched line -->
267 <has_text text="M207.9308T206" />
268 <has_text text="-0.313507" />
269 <has_text text="-20.0476" />
270 <has_text text="1.6956987" />
271 <has_text text="1.19247" />
272 <!-- third matched line -->
273 <has_text text="M211.0607T263" />
274 <has_text text="-0.38986114" />
275 <has_text text="-23.747718" />
276 <has_text text="1.064296856" />
277 <has_text text="1.16507455" />
278 </assert_contents>
279 </output>
280 <output name="contrast_salience">
281 <assert_contents>
282 <!-- column-labels line -->
283 <has_text text="featureID" />
284 <has_text text="salientLevel" />
285 <has_text text="salientRCV" />
286 <has_text text="salience" />
287 <!-- first matched line -->
288 <has_text text="M349.2383T700" />
289 <has_text text="0.659554" />
290 <has_text text="8.81866595" />
291 <!-- second matched line -->
292 <has_text text="M207.9308T206" />
293 <has_text text="0.0578578" />
294 <has_text text="2.27527985" />
295 <!-- third matched line -->
296 <has_text text="M211.0607T263" />
297 <has_text text="9999" />
298 <has_text text="12.87766096" />
299 </assert_contents>
300 </output>
301 </test>
302 </tests>
303 <!--
304 .. |reg| unicode:: U+000AE .. REGISTERED SIGN - see http://docutils.sourceforge.net/docutils/parsers/rst/include/isonum.txt or /usr/share/docutils/parsers/rst/include/isonum.txt
305 -->
306 <help><![CDATA[
307
308 **Run PLS-DA Contrasts of Univariate Results**
309 ----------------------------------------------
310
311 **Author** - Arthur Eschenlauer (University of Minnesota, esch0041@umn.edu)
312
313
314 Motivation
315 ----------
316
317 OPLS-DA\ :superscript:`®` and the SIMCA\ :superscript:`®` S-PLOT\ :superscript:`®` (Wiklund *et al.*, 2008) may be employed (e.g. Sun *et al.*, 2016) to identify features that are potential biomarkers, i.e. features that are potentially useful to discriminate to which class a sample should be assigned. Workflow4Metabolomics (W4M, Giacomoni *et al.*, 2014, Guitton *et al.*, 2017) provides a suite of tools for preprocessing and statistical analysis of LC-MS, GC-MS, and NMR metabolomics data; however, it does not (as of release 3.0) include a tool for making the equivalent of an S-PLOT.
318
319 The S-PLOT is computed from mean-centered, pareto-scaled data. This plot presents the correlation of the first score vector from an OPLS-DA model with the sample-variables used to produce that model versus the covariance of the scores with the sample-variables. For OPLS-DA, the first score vector represents the variation among the sample-variables that is explained by the contrasting factor.
320
321 The principal aims of this tool are:
322
323 - To compute multiple contrasts with OPLS-DA and the covariance vs. correlation plot.
324 - To visualize multiple contrasts compactly yet informatively.
325 - To write the results to data files for use in further multivariate analysis or visualization.
326
327
328 Description
329 -----------
330
331 The purpose of the 'PLS-DA Contrasts' tool is to identify and visualize GC-MS or LC-MS features that are possible biomarkers.
332
333 The W4M 'Univariate' tool (Thévenot *et al.*, 2015) adds the results of family-wise corrected pairwise significance-tests as columns of the **variableMetadata** dataset.
334 For instance, suppose that you ran Kruskal-Wallis testing for a column named 'cluster' in sampleMetadata that has values 'k1' and 'k2' and at least one other value.
335
336 - A column of variableMetadata would be labeled 'cluster_kruskal_sig' and would have values '1' and '0', where '1' means that, when the samples are grouped by 'cluster', there is strong evidence against the hypothesis that there is no difference among the intensities for the feature across all sample-groups.
337 - A column of variableMetadata would be labeled 'cluster_kruskal_k1.k2_sig' and would have values '1' and '0', where '1' means that there is significant evidence against the hypothesis that samples from sampleMetadata whose 'cluster' column contains 'k1' or 'k2' have the same intensity for that feature.
338
339 The 'PLS-DA Contrasts' tool produces graphics and data for OPLS-DA contrasts of feature-intensities between significantly different pairs of factor-levels. For each factor-level, the tool performs a contrast with all other factor-levels combined and then separately with each other factor-level.
340
341 This tool can be used in a purely exploratory manner by supplying the variableMetadata file without the columns added by the W4M 'Univariate' tool. However, the preferred workflow (Thévenot *et al.*, 2015) is to use univariate testing to exclude features that are not significantly different and use OPLS-DA to visualize the differences identified in univariate testing; an appropriate exception would be to visualize contrasts of a specific list of metabolites.
342
343 It must be stressed that there may be no definitive computational approach to select features that are guaranteed to be reliable biomarkers. Possible methods are examining extreme values on S-PLOTs, examining "variable importance in projection VIP for OPLS-DA" (Galindo-Prieto *et al.* 2014), or examining a feature's "selectivity ratio" (Rajalahti *et al.*, 2009). In this spirit, this tool reports the S-PLOT covariance and correlation (Wiklund *op. cit.*) and VIP metrics, and it introduces an informal "salience" metric to flag features that may merit attention without dimensional reduction; future versions may add selectivity ratio. Regardless of how any potential biomarker is identified, it should be subjected to further validation analysis before it is recommended for general application.
344
345
346 W4M Workflow Position
347 ---------------------
348
349 - Upstream tool: **Univariate** (category: Statistical Analysis) or (not generally recommended) any **Preprocessing** tool that produces or updates a 'variableMetadata' file.
350 - Downstream tool categories: **Statistical Analysis**
351
352 Input files
353 -----------
354
355 +----------------------+-----------+
356 | File | Format |
357 +======================+===========+
358 | Data matrix | tabular |
359 +----------------------+-----------+
360 | Sample metadata | tabular |
361 +----------------------+-----------+
362 | Variable metadata | tabular |
363 +----------------------+-----------+
364
365 Output files
366 ------------
367
368 +------------------------------+-----------+
369 | File | Format |
370 +==============================+===========+
371 | Contrast detail | pdf |
372 +------------------------------+-----------+
373 | Contrast cor and cov | tabular |
374 +------------------------------+-----------+
375 | Variable metadata supplement | tabular |
376 +------------------------------+-----------+
377
378 Parameters
379 ----------
380
381 [IN] Data matrix file
382 | variable x sample **dataMatrix** (tabular separated values) file of the numeric data matrix, with . as decimal, and NA for missing values; the table must not contain metadata apart from row and column names; the row and column names must be identical to the rownames of the sample and variable metadata, respectively (see below)
383 |
384
385 [IN] Sample metadata file
386 | sample x metadata **sampleMetadata** (tabular separated values) file of the numeric and/or character sample metadata, with . as decimal and NA for missing values
387 |
388
389 [IN] Variable metadata file
390 | variable x metadata **variableMetadata** (tabular separated values) file of the numeric and/or character variable metadata, with . as decimal and NA for missing values
391 |
392
393 [IN] Test
394 | Name of the **statistical test** - a component of column names in variable metadata table
395 | May be one of 'none', 'ttest', 'gwilcoxon', 'anova', 'kruskal', 'pearson', 'spearman'
396 |
397
398 [IN] Factor of interest
399 | Name of the **column of sampleMetadata** corresponding to the qualitative or quantitative variable
400 |
401
402 [IN] Retain only pairwise-significant features
403 | When true, for each contrast of two levels, include only those features which pass the significance threshold for that contrast. Choosing true results in an OPLS-DA model that better reflects and visualizes the difference detected by univariate analysis, with somewhat increased reliability of prediction (as assessed by cross-validation).
404 | When false, include all features that pass the significance threshold when testing for difference across all factor-levels. This choice produces a plot that displays more features but is not necessarily more informative.
405 |
406
407 [IN] Levels of interest
408 | comma-separated **level-names** (or comma-less regular expressions to match level-names) to consider in analysis; must match at least two levels; may include wild cards or regular expressions
409 |
410
411 [IN] Level-name matching
412 | How to **specify levels generically** - wild cards, regular expressions, or none (no generic matching)
413 |
414
415 [OUT] Contrast-detail output PDF
416 | Several plots for each two-projection OPLS-DA analysis:
417
418 - (top-left) **correlation-versus-covariance plot** of OPLS-DA results (a work-alike for the S-PLOT, computed using formula in Supplement to Wiklund, *op. cit.*); point-color becomes saturated as the "variable importance in projection to the predictive components" (VIP\ :subscript:`4,p` from Galindo-Prieto *et al.* 2014) ranges from 0.83 and 1.21 (Mehmood *et al.* 2012)
419 - (bottom-left) **model-overview plot** for the two projections; grey bars are the correlation coefficient for the fitted data; black bars indicate performance in cross-validation tests (Thévenot, 2017)
420 - (top-right) OPLS-DA **scores-plot** for the two projections (Thévenot *et al.*, 2015)
421 - (bottom-right) OPLS-DA **loadings-plot** for the two projections (*ibid.*)
422
423 [OUT] Contrast Correlation-Covarinace data TABULAR
424 | A tab-separated values file having the following columns:
425
426 - **featureID** - feature-identifier
427 - **factorLevel1** - factor-level 1
428 - **factorLevel2** - factor-level 2 (or "other" when contrasting factor-level 1 with all other levels)
429 - **correlation** - correlation of the features projection explaining the difference between the features, < 0 when intensity for level 1 is greater (from formula in Supplement to Wiklund, *op. cit.*)
430 - **covariance** - covariance of the features projection explaining the difference between the features, < 0 when intensity for level 1 is greater (from formula in *ibid.*)
431 - **vip4p** - "variable importance in projection" to the predictive components (VIP\ :subscript:`4,p` from Galindo-Prieto *op. cit.*)
432 - **vip4o** - "variable importance in projection" to the orthogonal components (VIP\ :subscript:`4,o` from Galindo-Prieto *op. cit.*)
433 - **level1Level2Sig** - (Only present when a test other than "none" is chosen) '1' when feature varies significantly across all classes (i.e., not pair-wise); '0' otherwise
434
435 [OUT] Feature "Salience" data TABULAR
436 | Metrics for the "salient level" for each feature, i.e., the level at which the feature is more prominent than any other level. This is *not* at all related to the SIMCA OPLS-DA S-PLOT; rather, it is intended as a potential (and unproven) way to identify features that may suggest potential biomarkers without dimensional reduction of data. This is a tab-separated values file having the following columns:
437
438 - **featureID** - feature identifier
439 - **salientLevel** - salient level, i.e., for the feature, the class-level having the greatest median intensity
440 - **salientRCV** - salient robust coefficient of variation, i.e., for the feature, the mean absolute deviation of the intensity for the salient level divided by the median intensity for the salient level
441 - **salience** - salience, i.e., for the feature, the median of the class-level having the greatest intensity divided by the mean of the medians for all class-levels
442
443 Wild card patterns to match level-names
444 ---------------------------------------
445
446 "wild card" patterns may be used to select level-names.
447
448 - use '``?``' to match a single character
449 - use '``*``' to match zero or more characters
450 - the entire pattern must match the level name
451
452 For example
453
454 - '``??.le*``' matches '``my.level``' but not '``my.own.level``'
455 - '``*.level``' matches '``my.level``' and '``my.own.level``'
456 - '``*.level``' matches neither '``my.level``' nor '``my.own.level``'
457
458 Regular expression patterns to match level-names
459 ------------------------------------------------
460
461 "regular expression" patterns may be used to select level-names.
462
463 POSIX 1003.2 standard regular expressions allow precise pattern-matching and are exhaustively defined at:
464 http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html
465
466 However, only a few basic building blocks of regular expressions need to be mastered for most cases:
467
468 - '``^``' matches the beginning of a level-name
469 - '``$``' matches the end of a level-name
470 - '``.``' outside of square brackets matches a single character
471 - '``*``' matches character specified immediately before zero or more times
472 - square brackets specify a set of characters to be matched.
473
474 Within square brackets
475
476 - '``^``' as the first character specifies that the list of characters are those that should **not** be matched.
477 - '``-``' is used to specify ranges of characters
478
479 Caveat: The tool wrapper uses the comma ('``,``') to split a list of sample-level names, so **commas may not be used within regular expressions for this tool**
480
481 First Example: Consider a field of level-names consisting of '``marq3,marq6,marq9,marq12,front3,front6,front9,front12``'
482
483 - The regular expression '``^front[0-9][0-9]*$``' will match the same sample-levels as '``front3,front6,front9,front12``'
484 - The regular expression '``^[a-z][a-z]3$``' will match the same sample-levels as '``front3,marq3``'
485 - The regular expression '``^[a-z][a-z]12$``' will match the same sample-levels as '``front12,marq12``'
486 - The regular expression '``^[a-z][a-z][0-9]$``' will match the same sample-levels as '``front3,front6,front9,marq3,marq6,marq9``'
487
488 Second Example: Consider these regular expression patterns as possible matches to a sample-level name '``AB0123``':
489
490 - '``^[A-Z][A-Z][0-9][0-9]*$``' - MATCHES '``**^AB0123$**``'
491 - '``^[A-Z][A-Z]*[0-9][0-9]*$``' - MATCHES '``**^AB0123$**``'
492 - '``^[A-Z][0-9]*``' - MATCHES '``**^A** B0123$``' - first character is a letter, '``*``' can specify zero characters, and end of line did not need to be matched.
493 - '``^[A-Z][A-Z][0-9]``' - MATCHES '``**^AB0** 123$``' - first two characters are letters aind the third is a digit.
494 - '``^[A-Z][A-Z]*[0-9][0-9]$``' - NO MATCH - the name does not end with the pattern '``[A-Z][0-9][0-9]$``', i.e., it ends with four digits, not two.
495 - '``^[A-Z][0-9]*$``' - NO MATCH - the pattern specifies that second character and all those that follow, if present, must be digits.
496
497 Working example
498 ---------------
499
500 **Input files**
501
502 +-------------------+-------------------------------------------------------------------------------------------------------------------+
503 | Input File | Download from URL |
504 +===================+===================================================================================================================+
505 | Data matrix | https://raw.githubusercontent.com/HegemanLab/w4mcorcov_galaxy_wrapper/master/test-data/input_dataMatrix.tsv |
506 +-------------------+-------------------------------------------------------------------------------------------------------------------+
507 | Sample metadata | https://raw.githubusercontent.com/HegemanLab/w4mcorcov_galaxy_wrapper/master/test-data/input_sampleMetadata.tsv |
508 +-------------------+-------------------------------------------------------------------------------------------------------------------+
509 | Variable metadata | https://raw.githubusercontent.com/HegemanLab/w4mcorcov_galaxy_wrapper/master/test-data/input_variableMetadata.tsv |
510 +-------------------+-------------------------------------------------------------------------------------------------------------------+
511
512 +-------------------------------------------+--------------------------------------------------+
513 | Input Parameter | Input value |
514 +===========================================+==================================================+
515 | Factor of interest | k10 |
516 +-------------------------------------------+--------------------------------------------------+
517 | Univariate Significance-Test | kruskal |
518 +-------------------------------------------+--------------------------------------------------+
519 | Retain only pairwise-significant features | Yes |
520 +-------------------------------------------+--------------------------------------------------+
521 | Levels of interest | k[12],k[3-4] |
522 +-------------------------------------------+--------------------------------------------------+
523 | Level-name matching | use regular expressions for matching level-names |
524 +-------------------------------------------+--------------------------------------------------+
525 | Label features on detail plot | Yes |
526 +-------------------------------------------+--------------------------------------------------+
527
528 +-------------------+---------------------------------------------------------------------------------------------------------------------+
529 | Expected Output | Download from URL |
530 +===================+=====================================================================================================================+
531 | Data matrix | https://raw.githubusercontent.com/HegemanLab/w4mcorcov_galaxy_wrapper/master/test-data/expected_contrast_corcov.tsv |
532 +-------------------+---------------------------------------------------------------------------------------------------------------------+
533
534
535 Trademarks
536 ----------
537
538 OPLS-DA\ :superscript:`®`, SIMCA\ :superscript:`®`, and S-PLOT\ :superscript:`®` are registered trademarks of the Umetrics company. http://umetrics.com/about-us/trademarks
539
540
541 Release notes
542 -------------
543
544 v0.98.2 - first release
545
546
547 ]]></help>
548 <citations>
549 <!-- Galindo_Prieto_2014 Variable influence on projection (VIP) for OPLS -->
550 <citation type="doi">10.1002/cem.2627</citation>
551 <!-- Giacomoni_2014 W4M 2.5 -->
552 <citation type="doi">10.1093/bioinformatics/btu813</citation>
553 <!-- Guitton_2017 W4M 3.0 -->
554 <citation type="doi">10.1016/j.biocel.2017.07.002</citation>
555 <!-- Mehmood_2012 PLS-based variable-selection -->
556 <citation type="doi">10.1186/1748-7188-6-27</citation>
557 <!-- Rajalahti_2009 Biomarker discovery using selectivity ratio -->
558 <citation type="doi">10.1016/j.chemolab.2008.08.004</citation>
559 <!-- Sun_2016 Urinary Biomarkers for adolescent idiopathic scoliosis -->
560 <citation type="doi">10.1038/srep22274</citation>
561 <!-- Th_venot_2015 Urinary metabolome statistics -->
562 <citation type="doi">10.1021/acs.jproteome.5b00354</citation>
563 <!-- ropls package -->
564 <citation type="bibtex"><![CDATA[
565 @incollection{Thevenot_ropls_2017,
566 author = {Th{\'{e}}venot, Etienne A.},
567 title = {ropls: PCA, PLS(-DA) and OPLS(-DA) for multivariate analysis and feature selection of omics data},
568 publisher = {bioconductor.org},
569 year = {2017},
570 doi = {10.18129/B9.bioc.ropls},
571 booktitle = {Bioconductor: Open source software for bioinformatics},
572 address = {Roswell Park Cancer Institute},
573 }
574 ]]></citation>
575 <!-- Wiklund_2008 OPLS PLS-DA and S-PLOT -->
576 <citation type="doi">10.1021/ac0713510</citation>
577 </citations>
578 <!--
579 vim:noet:sw=4:ts=4
580 -->
581 </tool>