Mercurial > repos > melpetera > batchcorrection
comparison batchcorrection-57edfd3943ab/determine_bc.xml @ 4:23314e1192d4 draft default tip
Uploaded
author | melpetera |
---|---|
date | Thu, 14 Jan 2021 09:56:58 +0000 |
parents | 73892ef177e3 |
children |
comparison
equal
deleted
inserted
replaced
3:73892ef177e3 | 4:23314e1192d4 |
---|---|
1 <tool id="Determine_BC" name="Determine_batch_correction" version="2.1.2"> | |
2 <description>to choose between linear, lowess and loess methods</description> | |
3 | |
4 <requirements> | |
5 <requirement type="package">r-batch</requirement> | |
6 <requirement type="package">r-ade4</requirement> | |
7 <requirement type="package">bioconductor-pcamethods</requirement> | |
8 </requirements> | |
9 | |
10 <stdio> | |
11 <exit_code range="1:" level="fatal" /> | |
12 </stdio> | |
13 | |
14 <command><![CDATA[ | |
15 Rscript $__tool_directory__/batch_correction_wrapper.R | |
16 analyse "determine_bc" | |
17 sampleMetadata "$sampleMetadata" | |
18 dataMatrix "$dataMatrix" | |
19 ref_factor "$ref_factor" | |
20 #if str($advance.option ) == 'show': | |
21 span $advance.span | |
22 #else: | |
23 span "none" | |
24 #end if | |
25 out_graph_pdf "$out_graph_pdf" | |
26 out_preNormSummary "$out_preNormSummary" | |
27 ]]></command> | |
28 | |
29 <inputs> | |
30 <param name="dataMatrix" type="data" label="Data Matrix file " help="" format="tabular" /> | |
31 <param name="sampleMetadata" type="data" label="Sample metadata file " help="must contain at least the three following columns: 'batch' + 'injectionOrder' + 'sampleType'" format="tabular" /> | |
32 <param name="ref_factor" type="text" label="Factor of interest " help="column name of the factor of interest (often a biological factor); if none, leave 'batch'" value="batch" /> | |
33 <conditional name="advance"> | |
34 <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"> | |
35 <option value="show">show</option> | |
36 <option value="hide" selected="true">hide</option> | |
37 </param> | |
38 <when value="show"> | |
39 <param name="span" type="float" value="0.85" label="span" help="applied to lowess and loess regression"/> | |
40 </when> | |
41 </conditional> | |
42 </inputs> | |
43 | |
44 <outputs> | |
45 <data name="out_graph_pdf" label="Determine_BC_graph" format="pdf" ></data> | |
46 <data name="out_preNormSummary" label="Determine_BC_preNormSummary" format="tabular" ></data> | |
47 </outputs> | |
48 | |
49 <tests> | |
50 <test> | |
51 <param name="dataMatrix" value="input-determinebc-dataMatrix.tsv"/> | |
52 <param name="sampleMetadata" value="input-determinebc-sampleMetadata.tsv"/> | |
53 <param name="ref_factor" value="batch"/> | |
54 <param name="option" value="hide"/> | |
55 <param name="span" value="none"/> | |
56 <output name="out_preNormSummary" file="output-determinebc-preNormSummary.txt"/> | |
57 </test> | |
58 </tests> | |
59 | |
60 <help> | |
61 | |
62 .. class:: infomark | |
63 | |
64 **Authors** | |
65 | Jean-Francois Martin - PF MetaToul-AXIOM ; INRA ; MetaboHUB (for original version of this tool and overall development of the R script) | |
66 | |
67 .. class:: infomark | |
68 | |
69 **Contributors** | |
70 | Melanie Petera - PFEM ; INRA ; MetaboHUB (for R wrapper and R script improvement) | |
71 | |
72 .. class:: infomark | |
73 | |
74 **Wrapping** | |
75 | Marion Landi - FLAME ; PFEM ; INRA ; MetaboHUB (for xml interface and R wrapper) | |
76 | Franck Giacomoni - PFEM ; INRA ; MetaboHUB (for xml interface and R wrapper) | |
77 | |
78 --------------------------------------------------- | |
79 | |
80 .. class:: infomark | |
81 | |
82 **Please cite** If you use this tool, please cite: | |
83 | `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>`_ | |
84 | |
85 --------------------------------------------------- | |
86 | |
87 ========================== | |
88 Determine_batch_correction | |
89 ========================== | |
90 | |
91 ----------- | |
92 Description | |
93 ----------- | |
94 | |
95 | Allows to choose between linear or non-linear (lowess or loess) functions for batch correction | |
96 | using quality control pooled samples (QC-pools) with correction algorithm as mentioned by Van Der Kloet (J Prot Res 2009). | |
97 | | |
98 | Warning : this module does *not* deliver which choice should be made in model type; | |
99 | it only provides tools to help users to determine which choice may be appropriate, based on their own expertise. | |
100 | | |
101 | This tool is meant to be used prior to the Batch_correction tool to help make a choice in parameters, | |
102 | but it is not a requirement and thus can be avoided. | |
103 | |
104 | |
105 ----------------- | |
106 Workflow position | |
107 ----------------- | |
108 | |
109 .. image:: determine_batch_correction.png | |
110 :width: 800 | |
111 | |
112 | |
113 ----------- | |
114 Input files | |
115 ----------- | |
116 | |
117 +--------------------------+-----------+ | |
118 | Parameter : num + label | Format | | |
119 +==========================+===========+ | |
120 | 1 : Data Matrix file | tabular | | |
121 +--------------------------+-----------+ | |
122 | 2 : Sample metadata file | tabular | | |
123 +--------------------------+-----------+ | |
124 | |
125 | |
126 Data Matrix file must contain the intensity values of the variables. | |
127 | First line must contain all the samples' names | |
128 | First column must contain all the variables' ID | |
129 | | |
130 | |
131 Sample metadata file must contain at least the three following columns: | |
132 | "batch" to identify the batches of analyses | |
133 | "injectionOrder" (integers) defining the injection order of all samples (QC-pools as well as analysed samples) | |
134 | "sampleType" indicating if a sample ("sample") or a QC-pool ("pool"); each batch needs | |
135 | at least 3 QC-pools for intra-batch linear adjustment and 8 for lo(w)ess adjustment | |
136 | |
137 | |
138 .. class:: warningmark | |
139 | |
140 NO MISSING DATA are allowed | |
141 | |
142 | |
143 ---------- | |
144 Parameters | |
145 ---------- | |
146 | |
147 Factor of interest | |
148 | name of the factor (column header) that will be used as a categorical variable for plots. | |
149 | (often a biological factor ; if none, leave “batch”). | |
150 | This factor does not affect correction calculation. | |
151 | | |
152 | |
153 Advanced options | |
154 | should only be put at "show" if you have good understanding of the span parameter and are willing to adjust it. | |
155 | | |
156 | |
157 Span | |
158 | - when advanced option is at "hide" (default) | |
159 | default is 1 for loess regression and is two times the ratio between number of pools and number of samples for lowess regression. | |
160 | - when advanced option is at "show" : | |
161 | filled value is used for lowess and loess regression. | |
162 | |
163 | |
164 ------------ | |
165 Output files | |
166 ------------ | |
167 | |
168 Determine_BC_preNormSummary.tabular | |
169 | tabular output | |
170 | Meaning of results of diagnosis analysis | |
171 | 0 : no preliminary-condition problem | |
172 | 1 : standard deviation of QC-pools or samples = 0 | |
173 | 2 : insufficient number of QC-pools within a batch (n=3 for linear, n=8 for lowess or loess) | |
174 | 3 : significant difference between QC-pools and samples means | |
175 | 4 : denominator =0 when on 1 pool per batch non-0 | |
176 | 5 : (linear regression only) the slopes ratio “QC-pools/samples” is lower than -0.2 | |
177 | | |
178 | |
179 Determine_BC_graph.pdf | |
180 | graphical output | |
181 | One page per ion. Plots regression curves for all methods allowed and plot.design results regarding the factor of interest. | |
182 | |
183 | |
184 --------------------------------------------------- | |
185 | |
186 --------------- | |
187 Working example | |
188 --------------- | |
189 | |
190 | |
191 .. class:: warningmark | |
192 | |
193 Refer to the corresponding "W4M HowTo" page: | |
194 | `MS data processing - Filters and normalisation <http://workflow4metabolomics.org/sites/workflow4metabolomics.org/files/files/w4e-2016-data_processing.pdf>`_ | |
195 | | |
196 | | |
197 | |
198 | |
199 </help> | |
200 | |
201 <!-- [RECOMMANDED] All citations associated to this tool (main citation given above and other references). Can be extracted from the history panel --> | |
202 <citations> | |
203 <!-- [HELP] As DOI or BibTex entry --> | |
204 <citation type="doi">10.1021/pr900499r</citation> | |
205 </citations> | |
206 | |
207 <!-- | |
208 Input files | |
209 =========== | |
210 | |
211 | **These two input files can be used in the purview "URL/Text:" of the tool "Get Data/Upload File",** | |
212 | **by checking the box "Convert spaces to tabs: YES"** | |
213 | |
214 Metadata_samples.txt | |
215 Model input Sample metadata file:: | |
216 | |
217 samples idLIMS serie factor01 factor02 batch injectionOrder sampleType | |
218 POOL1 POOL1 pool p pool 01_08_2011 1 p | |
219 X12588 12588 3 validation 2 01_08_2011 2 s | |
220 X17736 17736 3 Q1 1 01_08_2011 3 s | |
221 X15432 15432 3 validation 1 01_08_2011 4 s | |
222 X17159 17159 3 Q4 1 01_08_2011 5 s | |
223 X14325 14325 3 validation 2 01_08_2011 6 s | |
224 X17419 17419 3 Q4 1 01_08_2011 7 s | |
225 X16437 16437 3 Q4 1 01_08_2011 8 s | |
226 X16172 16172 3 Q4 2 01_08_2011 9 s | |
227 X16392 16392 3 Q4 2 01_08_2011 10 s | |
228 X13875 13875 3 validation 2 01_08_2011 11 s | |
229 POOL2 POOL2 pool p pool 01_08_2011 12 p | |
230 X13117 13117 3 Q4 2 01_08_2011 13 s | |
231 X13341 13341 3 Q1 2 01_08_2011 14 s | |
232 X16888 16888 3 Q4 1 01_08_2011 15 s | |
233 X17489 17489 3 Q4 2 01_08_2011 16 s | |
234 X12718 12718 3 Q1 2 01_08_2011 17 s | |
235 X16235 16235 3 Q4 2 01_08_2011 18 s | |
236 X16878 16878 3 Q1 1 01_08_2011 19 s | |
237 X12701 12701 3 validation 1 01_08_2011 20 s | |
238 X16220 16220 3 Q4 2 01_08_2011 21 s | |
239 X15635 15635 3 Q4 1 01_08_2011 22 s | |
240 | |
241 | |
242 Intensity_matrix.txt | |
243 Model input Matrix Ions file BEFORE IMPLEMENTATION:: | |
244 | |
245 samples POOL1 X12588 X17736 X15432 X17159 X14325 X17419 X16437 X16172 X16392 X13875 POOL2 X13117 X13341 X16888 X17489 X12718 X16235 X16878 X12701 X16220 X15635 | |
246 ion01 188.4140625 219.729126 122.5697632 123.5487671 805.8852539 183.4683838 37.33084106 151.8625488 97.12005615 91.24694824 69.87762451 195.4349365 112.4111938 136.7092285 159.9987793 172.1585693 0 117.5420532 133.6679688 80.05419922 160.0006104 760.0488281 | |
247 ion02 82.02575684 87.11358643 79.82391357 80.33862305 83.08575439 94.27703857 76.02288818 77.04394531 76.97564697 84.17669678 81.04943848 86.44024658 84.11865234 83.71282959 77.75219727 79.15936279 75.98492432 78.2835083 78.98760986 73.98388672 72.20550537 82.16448975 | |
248 ion03 25.31900024 24.2960968 23.29342651 31.54063416 30.3830719 22.42404175 35.44485474 26.38783264 17.1401825 21.27339172 20.25959778 26.33859253 18.17146301 26.32852173 24.30648804 28.34313965 29.37016296 18.23519897 24.48402405 25.38140869 24.35777283 21.31071472 | |
249 ion04 65.87536621 62.68716431 46.60232544 62.77856445 29.53218079 47.59136963 90.13983154 28.35336304 58.74325562 31.39331055 23.32928467 30.39666748 41.43960571 21.27049255 88.1161499 29.36820984 24.30200195 25.00007629 45.60662842 103.293457 37.46994019 87.09295654 | |
250 ion05 0 103.728544 279.5808214 884.2333448 824.5072072 434.6439081 764.82768 799.0972595 398.4002569 382.5370891 74.55342827 0 636.6596277 514.3863309 741.690017 412.3166491 660.8996555 57.36593795 102.2085264 455.6403091 548.6145486 515.8412195 | |
251 ion06 2711.785156 3465.292969 2469.75 3435.259766 2482.3125 2593.654297 1407.915039 1291.253906 2241.734375 1444.189453 3363.683594 2578.642578 2633.181641 3397.763672 3706.855469 3647.212891 3548.410156 3714.640625 1889.213867 2262.707031 2107.417969 2763.21875 | |
252 ion07 164.9023438 192.40625 140.7609863 192.4053955 139.7540283 140.748291 84.60144043 86.1819458 150.762207 89.90411377 207.5949707 164.0512695 149.8706055 186.336792 214.6140137 202.5360107 214.6877441 195.4482422 117.4679565 127.2941895 142.78479 163.0666504 | |
253 | |
254 | |
255 Parameters | |
256 ========== | |
257 | |
258 Factor analysis -> **batch** | |
259 | |
260 | |
261 Output files | |
262 ============ | |
263 | |
264 out_preNormSummary.tabular: | |
265 | |
266 ====== ============== ============== | |
267 labion batch.1.linear batch.1.lowess | |
268 ====== ============== ============== | |
269 ion01 2 2 | |
270 ion02 2 2 | |
271 ion03 2 2 | |
272 ion04 2 2 | |
273 ion05 1 1 | |
274 ... ... ... | |
275 ====== ============== ============== | |
276 | |
277 | |
278 out_graph_pdf.pdf | |
279 | |
280 .. image:: ./static/images/metabolomics/pdf_plotsituation.png | |
281 :width: 800 | |
282 --> | |
283 | |
284 </tool> |