4
|
1 <tool id="Determine_BC" name="Determine_batch_correction" version="3.0.0">
|
|
2 <description>to choose between linear, lowess and loess methods</description>
|
|
3
|
|
4 <macros>
|
|
5 <import>macros.xml</import>
|
|
6 </macros>
|
|
7
|
|
8 <requirements>
|
|
9 <requirement type="package" version="1.1_4">r-batch</requirement>
|
|
10 <requirement type="package" version="1.7_8">r-ade4</requirement>
|
|
11 <requirement type="package" version="1.70.0">bioconductor-pcamethods</requirement>
|
|
12 </requirements>
|
|
13
|
|
14 <stdio>
|
|
15 <exit_code range="1:" level="fatal" />
|
|
16 </stdio>
|
|
17
|
|
18 <command><![CDATA[
|
|
19 Rscript $__tool_directory__/batch_correction_3Lwrapper.R
|
|
20 analyse "determine_bc"
|
|
21 sampleMetadata "$sampleMetadata"
|
|
22 dataMatrix "$dataMatrix"
|
|
23 ref_factor "$ref_factor"
|
|
24 #if str($advance.option ) == 'show':
|
|
25 span $advance.span
|
|
26 #else:
|
|
27 span "none"
|
|
28 #end if
|
|
29 out_graph_pdf "$out_graph_pdf"
|
|
30 out_preNormSummary "$out_preNormSummary"
|
|
31 @SM_CUSTOM@
|
|
32 ]]></command>
|
|
33
|
|
34 <inputs>
|
|
35 <param name="dataMatrix" type="data" label="Data matrix file " help="" format="tabular" />
|
|
36 <param name="sampleMetadata" type="data" label="Sample metadata file " help="must contain at least the three following columns: 'batch' + 'injectionOrder' + 'sampleType'" format="tabular" />
|
|
37 <expand macro="sm_customisation"/>
|
|
38 <expand macro="foi"/>
|
|
39 <conditional name="advance">
|
|
40 <param name="option" type="select" label="Advanced options" help="should only be put at 'show' if you have good understanding of the span parameter and are willing to adjust it">
|
|
41 <option value="show">show</option>
|
|
42 <option value="hide" selected="true">hide</option>
|
|
43 </param>
|
|
44 <when value="show">
|
|
45 <param name="span" type="float" value="0.85" label="span" help="applied to lowess and loess regression"/>
|
|
46 </when>
|
|
47 <when value="hide"/>
|
|
48 </conditional>
|
|
49 </inputs>
|
|
50
|
|
51 <outputs>
|
|
52 <data name="out_graph_pdf" label="Determine_BC_graph" format="pdf" ></data>
|
|
53 <data name="out_preNormSummary" label="Determine_BC_preNormSummary" format="tabular" ></data>
|
|
54 </outputs>
|
|
55
|
|
56 <tests>
|
|
57 <test>
|
|
58 <param name="dataMatrix" value="input-determinebc-dataMatrix.tsv"/>
|
|
59 <param name="sampleMetadata" value="input-determinebc-sampleMetadata.tsv"/>
|
|
60 <param name="ref_factor" value="batch"/>
|
|
61 <param name="option" value="hide"/>
|
|
62 <param name="span" value="none"/>
|
|
63 <output name="out_preNormSummary" file="output-determinebc-preNormSummary.txt"/>
|
|
64 </test>
|
|
65 </tests>
|
|
66
|
|
67 <help>
|
|
68
|
|
69 .. class:: infomark
|
|
70
|
|
71 **Authors**
|
|
72 | Jean-Francois Martin - PF MetaToul-AXIOM ; INRAE ; MetaboHUB (for original version of this tool and overall development of the R script)
|
|
73
|
|
74 .. class:: infomark
|
|
75
|
|
76 **Contributors**
|
|
77 | Melanie Petera - PFEM ; INRAE ; MetaboHUB (for R wrapper and R script improvement)
|
|
78
|
|
79 .. class:: infomark
|
|
80
|
|
81 **Wrapping**
|
|
82 | Marion Landi - FLAME ; PFEM (for original xml interface and R wrapper)
|
|
83 | Franck Giacomoni - PFEM ; INRAE ; MetaboHUB (for original xml interface and R wrapper)
|
|
84
|
|
85 ---------------------------------------------------
|
|
86
|
|
87 .. class:: infomark
|
|
88
|
|
89 **Please cite** If you use this tool, please cite:
|
|
90 | `F.M. van der Kloet, I. Bobeldijk, E.R. Verheij, R.H. Jellema. (2009). "Analytical error reduction using single point calibration for accurate and precise metabolomic phenotyping." Journal of Proteome Research p5132-5141 <http://www.ncbi.nlm.nih.gov/pubmed/19754161>`_
|
|
91
|
|
92 ---------------------------------------------------
|
|
93
|
|
94 ==========================
|
|
95 Determine_batch_correction
|
|
96 ==========================
|
|
97
|
|
98 |
|
|
99
|
|
100 -----------
|
|
101 Description
|
|
102 -----------
|
|
103
|
|
104 |
|
|
105
|
|
106 Generates outputs to help to determine what type of regression to use between linear or non-linear (lowess or loess) functions for batch correction
|
|
107 using quality control pooled samples (QC-pools) with correction algorithm as described by Van Der Kloet (J Prot Res 2009).
|
|
108
|
|
109
|
|
110 Warning: this module does *not* deliver which choice should be made in model type;
|
|
111 it only provides information to help users in determining which choice may be appropriate, based on their own expertise.
|
|
112
|
|
113
|
|
114 This tool is meant to be used prior to the Batch_correction tool to help to make a choice in parameters,
|
|
115 but it is not a requirement and thus can be avoided.
|
|
116
|
|
117 |
|
|
118
|
|
119 -----------------
|
|
120 Workflow position
|
|
121 -----------------
|
|
122
|
|
123 .. image:: determine_batch_correction.png
|
|
124 :width: 600
|
|
125
|
|
126
|
|
127 -----------
|
|
128 Input files
|
|
129 -----------
|
|
130
|
|
131 +--------------------------+-----------+
|
|
132 | Parameter : num + label | Format |
|
|
133 +==========================+===========+
|
|
134 | 1 : Data matrix file | tabular |
|
|
135 +--------------------------+-----------+
|
|
136 | 2 : Sample metadata file | tabular |
|
|
137 +--------------------------+-----------+
|
|
138
|
|
139 |
|
|
140
|
|
141 The data matrix file must contain the intensity values of variables.
|
|
142 | First line must contain all the samples' names.
|
|
143 | First column must contain all the variables' ID.
|
|
144
|
|
145
|
|
146 The sample metadata file must contain at least the three following columns:
|
|
147 | - a batch column (default to "*batch*") to identify the batches of analyses
|
|
148 | - an injection order column (default to "*injectionOrder*") composed of integers defining the injection order of samples
|
|
149 | - a sample type column (default to "*sampleType*") indicating if a sample is a biological one ("*sample*"), a QC-pool ("*pool*") or a blank ("*blank*")
|
|
150 | *Default values* can be changed according to your data coding using the customisation parameters in the "**Sample metadata file coding parameters**" section.
|
|
151
|
|
152
|
|
153 **Notes concerning your design:**
|
|
154 | - the 3 mandatory columns must not contain NA
|
|
155 | - your data should contain at least 3 QC-pools in each batch for intra-batch **linear** adjustment and 8 for **lo(w)ess** adjustment
|
|
156
|
|
157
|
|
158
|
|
159 ----------
|
|
160 Parameters
|
|
161 ----------
|
|
162
|
|
163 Sample metadata file coding parameters
|
|
164 | Enables to give the names of columns in the sample metadata table that contain the injection order, the batches and the sample types.
|
|
165 | Also enables to specify the sample type coding used in the sampletype column.
|
|
166 |
|
|
167
|
|
168 Factor of interest
|
|
169 | Name of the factor (column header) that will be used as a categorical variable for design plots (often a biological factor ; if none, put the batch column name).
|
|
170 | This factor does not affect correction calculation.
|
|
171 |
|
|
172
|
|
173 Advanced options
|
|
174 | Should only be put at "show" if you have good understanding of the span parameter and are willing to adjust it.
|
|
175 |
|
|
176
|
|
177 Span
|
|
178 | - When advanced option is at "hide" (default):
|
|
179 | default is 1 for loess regression and is two times the ratio between number of pools and number of samples for lowess regression.
|
|
180 | - When advanced option is at "show":
|
|
181 | filled value is used for lowess and loess regressions.
|
|
182
|
|
183
|
|
184 ------------
|
|
185 Output files
|
|
186 ------------
|
|
187
|
|
188 Determine_BC_preNormSummary.tabular
|
|
189 | tabular output
|
|
190 | Meaning of results of diagnosis analysis
|
|
191 | 0 - no preliminary-condition problem
|
|
192 | 1 - standard deviation of QC-pools or samples = 0
|
|
193 | 2 - insufficient number of QC-pools within a batch (n=3 for linear, n=8 for lowess or loess)
|
|
194 | 2.5 - less than 2 samples within a batch
|
|
195 | 3 - significant difference between QC-pools' and samples' means
|
|
196 | 4 - denominator =0 when on 1 pool per batch non-zero
|
|
197 | 5 - (linear regression only) the slopes ratio “QC-pools/samples” is lower than -0.2
|
|
198 | 6 - (linear regression only) none of the pool or sample could be corrected if negative and infinite values are turned into NA
|
|
199 |
|
|
200
|
|
201 Determine_BC_graph.pdf
|
|
202 | graphical output
|
|
203 | One page per ion. Plots regression curves for all methods allowed and plot.design results regarding the factor of interest.
|
|
204
|
|
205
|
|
206 ---------------------------------------------------
|
|
207
|
|
208 ----------------------
|
|
209 Additional information
|
|
210 ----------------------
|
|
211
|
|
212
|
|
213 .. class:: warningmark
|
|
214
|
|
215 Refer to the corresponding "W4M HowTo" page:
|
|
216 | `MS data processing - Filters and normalisation <https://download.workflow4metabolomics.org/docs/w4e2018/2018-10_EC_W4E%20-%20Dataprocessing_Filter_and_normalisation.pdf>`_
|
|
217 |
|
|
218 |
|
|
219
|
|
220
|
|
221 </help>
|
|
222
|
|
223 <!-- [RECOMMANDED] All citations associated to this tool (main citation given above and other references). Can be extracted from the history panel -->
|
|
224 <citations>
|
|
225 <!-- [HELP] As DOI or BibTex entry -->
|
|
226 <citation type="doi">10.1021/pr900499r</citation>
|
|
227 </citations>
|
|
228
|
|
229
|
|
230
|
|
231 </tool>
|