Mercurial > repos > melpetera > batchcorrection
comparison determine_bc.xml @ 0:71d83d8920bf draft
planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit de79117e6ab856420b87efca3675c7963688f975
author | melpetera |
---|---|
date | Tue, 09 Aug 2016 06:47:41 -0400 |
parents | |
children | f64656ae9ea4 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:71d83d8920bf |
---|---|
1 <tool id="Determine_BC" name="Determine_batch_correction" version="2.0.0"> | |
2 <description>to choose between linear, lowess and loess methods</description> | |
3 | |
4 <requirements> | |
5 <requirement type="package" version="3.3.1">R</requirement> | |
6 <requirement type="package">r-batch</requirement> | |
7 <requirement type="package">r-ade4</requirement> | |
8 <requirement type="package">r-pcaMethods</requirement> | |
9 </requirements> | |
10 | |
11 <stdio> | |
12 <exit_code range="1:" level="fatal" /> | |
13 </stdio> | |
14 | |
15 <command><![CDATA[ | |
16 Rscript $__tool_directory__/batch_correction_wrapper.R | |
17 analyse "determine_bc" | |
18 sampleMetadata "$sampleMetadata" | |
19 dataMatrix "$dataMatrix" | |
20 ref_factor "$ref_factor" | |
21 #if str($advance.option ) == 'show': | |
22 span $advance.span | |
23 #else: | |
24 span "none" | |
25 #end if | |
26 out_graph_pdf "$out_graph_pdf" | |
27 out_preNormSummary "$out_preNormSummary" | |
28 ]]></command> | |
29 | |
30 <inputs> | |
31 <param name="dataMatrix" type="data" label="Data Matrix file " help="" format="tabular" /> | |
32 <param name="sampleMetadata" type="data" label="Sample metadata file " help="must contain at least the three following columns: 'batch' + 'injectionOrder' + 'sampleType'" format="tabular" /> | |
33 <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" /> | |
34 <conditional name="advance"> | |
35 <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"> | |
36 <option value="show">show</option> | |
37 <option value="hide" selected="true">hide</option> | |
38 </param> | |
39 <when value="hide"> | |
40 <param name="span" type="hidden" value="none"/> | |
41 </when> | |
42 <when value="show"> | |
43 <param name="span" type="float" value="0.85" label="span" help="applied to lowess and loess regression"/> | |
44 </when> | |
45 </conditional> | |
46 </inputs> | |
47 | |
48 <outputs> | |
49 <data name="out_graph_pdf" label="Determine_BC_graph" format="pdf" ></data> | |
50 <data name="out_preNormSummary" label="Determine_BC_preNormSummary" format="tabular" ></data> | |
51 </outputs> | |
52 | |
53 <tests> | |
54 <test> | |
55 <param name="dataMatrix" value="input-determinebc-dataMatrix.tsv"/> | |
56 <param name="sampleMetadata" value="input-determinebc-sampleMetadata.tsv"/> | |
57 <param name="ref_factor" value="batch"/> | |
58 <param name="option" value="hide"/> | |
59 <param name="span" value="none"/> | |
60 <output name="out_preNormSummary" file="output-determinebc-preNormSummary.txt"/> | |
61 </test> | |
62 </tests> | |
63 | |
64 <help> | |
65 | |
66 .. class:: infomark | |
67 | |
68 **Authors** Franck Giacomoni and Marion Landi (for interface and wrapper) and Jean-Francois Martin and Melanie Petera (for R) | |
69 | |
70 --------------------------------------------------- | |
71 | |
72 .. class:: infomark | |
73 | |
74 **Please cite** If you use this tool, please cite `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>`_ | |
75 | |
76 --------------------------------------------------- | |
77 | |
78 ========================== | |
79 Determine_batch_correction | |
80 ========================== | |
81 | |
82 ----------- | |
83 Description | |
84 ----------- | |
85 | |
86 | Allows to choose between linear or non-linear (lowess or loess) functions for batch correction | |
87 | using quality control pooled samples (QC-pools) with correction algorithm as mentioned by Van Der Kloet (J Prot Res 2009). | |
88 | | |
89 | Warning : this module does *not* deliver which choice should be made in model type; | |
90 | it only provides tools to help users to determine which choice may be appropriate, based on their own expertise. | |
91 | | |
92 | This tool is meant to be used prior to the Batch_correction tool to help make a choice in parameters, | |
93 | but it is not a requirement and thus can be avoided. | |
94 | |
95 | |
96 ----------------- | |
97 Workflow position | |
98 ----------------- | |
99 | |
100 .. image:: ./static/images/metabolomics/determine_batch_correction.png | |
101 :width: 800 | |
102 | |
103 | |
104 ----------- | |
105 Input files | |
106 ----------- | |
107 | |
108 +--------------------------+-----------+ | |
109 | Parameter : num + label | Format | | |
110 +==========================+===========+ | |
111 | 1 : Data Matrix file | tabular | | |
112 +--------------------------+-----------+ | |
113 | 2 : Sample metadata file | tabular | | |
114 +--------------------------+-----------+ | |
115 | |
116 | |
117 Data Matrix file must contain the intensity values of the variables. | |
118 | First line must contain all the samples' names | |
119 | First column must contain all the variables' ID | |
120 | | |
121 | |
122 Sample metadata file must contain at least the three following columns: | |
123 | "batch" to identify the batches of analyses | |
124 | "injectionOrder" (integers) defining the injection order of all samples (QC-pools as well as analysed samples) | |
125 | "sampleType" indicating if a sample ("sample") or a QC-pool ("pool"); each batch needs | |
126 | at least 3 QC-pools for intra-batch linear adjustment and 8 for lo(w)ess adjustment | |
127 | |
128 | |
129 .. class:: warningmark | |
130 | |
131 NO MISSING DATA are allowed | |
132 | |
133 | |
134 ---------- | |
135 Parameters | |
136 ---------- | |
137 | |
138 Factor of interest | |
139 | name of the factor (column header) that will be used as a categorical variable for plots. | |
140 | (often a biological factor ; if none, leave “batch”). | |
141 | This factor does not affect correction calculation. | |
142 | | |
143 | |
144 Advanced options | |
145 | should only be put at "show" if you have good understanding of the span parameter and are willing to adjust it. | |
146 | | |
147 | |
148 Span | |
149 | - when advanced option is at "hide" (default) | |
150 | default is 1 for loess regression and is two times the ratio between number of pools and number of samples for lowess regression. | |
151 | - when advanced option is at "show" : | |
152 | filled value is used for lowess and loess regression. | |
153 | |
154 | |
155 ------------ | |
156 Output files | |
157 ------------ | |
158 | |
159 Determine_BC_preNormSummary.tabular | |
160 | tabular output | |
161 | Meaning of results of diagnosis analysis | |
162 | 0 : no preliminary-condition problem | |
163 | 1 : standard deviation of QC-pools or samples = 0 | |
164 | 2 : insufficient number of QC-pools within a batch (n=3 for linear, n=8 for lowess or loess) | |
165 | 3 : significant difference between QC-pools and samples means | |
166 | 4 : denominator =0 when on 1 pool per batch non-0 | |
167 | 5 : (linear regression only) the slopes ratio “QC-pools/samples” is lower than -0.2 | |
168 | | |
169 | |
170 Determine_BC_graph.pdf | |
171 | graphical output | |
172 | One page per ion. Plots regression curves for all methods allowed and plot.design results regarding the factor of interest. | |
173 | |
174 | |
175 --------------------------------------------------- | |
176 | |
177 --------------- | |
178 Working example | |
179 --------------- | |
180 | |
181 | |
182 .. class:: warningmark | |
183 | |
184 Soon see the corresponding "Page" | |
185 | |
186 | |
187 </help> | |
188 | |
189 <citations> | |
190 <citation type="bibtex">@Article{Kloet2009, | |
191 Title = {Analytical error reduction using single point calibration for accurate and precise metabolomic phenotyping}, | |
192 Author = {van der Kloet, Frans M. and Bobeldijk, Ivana and Verheij, Elwin R. and Jellema, Renger H.}, | |
193 Journal = {Journal of Proteome Research}, | |
194 Year = {2009}, | |
195 Note = {PMID: 19754161}, | |
196 Number = {11}, | |
197 Pages = {5132-5141}, | |
198 Volume = {8}, | |
199 | |
200 Doi = {10.1021/pr900499r}, | |
201 Url = {http://pubs.acs.org/doi/abs/10.1021/pr900499r} | |
202 }</citation> | |
203 <citation type="doi">10.1093/bioinformatics/btu813</citation> | |
204 </citations> | |
205 | |
206 <!-- | |
207 Input files | |
208 =========== | |
209 | |
210 | **These two input files can be used in the purview "URL/Text:" of the tool "Get Data/Upload File",** | |
211 | **by checking the box "Convert spaces to tabs: YES"** | |
212 | |
213 Metadata_samples.txt | |
214 Model input Sample metadata file:: | |
215 | |
216 samples idLIMS serie factor01 factor02 batch injectionOrder sampleType | |
217 POOL1 POOL1 pool p pool 01_08_2011 1 p | |
218 X12588 12588 3 validation 2 01_08_2011 2 s | |
219 X17736 17736 3 Q1 1 01_08_2011 3 s | |
220 X15432 15432 3 validation 1 01_08_2011 4 s | |
221 X17159 17159 3 Q4 1 01_08_2011 5 s | |
222 X14325 14325 3 validation 2 01_08_2011 6 s | |
223 X17419 17419 3 Q4 1 01_08_2011 7 s | |
224 X16437 16437 3 Q4 1 01_08_2011 8 s | |
225 X16172 16172 3 Q4 2 01_08_2011 9 s | |
226 X16392 16392 3 Q4 2 01_08_2011 10 s | |
227 X13875 13875 3 validation 2 01_08_2011 11 s | |
228 POOL2 POOL2 pool p pool 01_08_2011 12 p | |
229 X13117 13117 3 Q4 2 01_08_2011 13 s | |
230 X13341 13341 3 Q1 2 01_08_2011 14 s | |
231 X16888 16888 3 Q4 1 01_08_2011 15 s | |
232 X17489 17489 3 Q4 2 01_08_2011 16 s | |
233 X12718 12718 3 Q1 2 01_08_2011 17 s | |
234 X16235 16235 3 Q4 2 01_08_2011 18 s | |
235 X16878 16878 3 Q1 1 01_08_2011 19 s | |
236 X12701 12701 3 validation 1 01_08_2011 20 s | |
237 X16220 16220 3 Q4 2 01_08_2011 21 s | |
238 X15635 15635 3 Q4 1 01_08_2011 22 s | |
239 | |
240 | |
241 Intensity_matrix.txt | |
242 Model input Matrix Ions file BEFORE IMPLEMENTATION:: | |
243 | |
244 samples POOL1 X12588 X17736 X15432 X17159 X14325 X17419 X16437 X16172 X16392 X13875 POOL2 X13117 X13341 X16888 X17489 X12718 X16235 X16878 X12701 X16220 X15635 | |
245 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 | |
246 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 | |
247 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 | |
248 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 | |
249 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 | |
250 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 | |
251 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 | |
252 | |
253 | |
254 Parameters | |
255 ========== | |
256 | |
257 Factor analysis -> **batch** | |
258 | |
259 | |
260 Output files | |
261 ============ | |
262 | |
263 out_preNormSummary.tabular: | |
264 | |
265 ====== ============== ============== | |
266 labion batch.1.linear batch.1.lowess | |
267 ====== ============== ============== | |
268 ion01 2 2 | |
269 ion02 2 2 | |
270 ion03 2 2 | |
271 ion04 2 2 | |
272 ion05 1 1 | |
273 ... ... ... | |
274 ====== ============== ============== | |
275 | |
276 | |
277 out_graph_pdf.pdf | |
278 | |
279 .. image:: ./static/images/metabolomics/pdf_plotsituation.png | |
280 :width: 800 | |
281 --> | |
282 | |
283 </tool> |