Mercurial > repos > ethevenot > batchcorrection
comparison BC/determine_bc.xml @ 3:2e3a23dd6c24 draft default tip
Uploaded
| author | melpetera |
|---|---|
| date | Thu, 28 Feb 2019 05:12:34 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 2:57edfd3943ab | 3:2e3a23dd6c24 |
|---|---|
| 1 <tool id="Determine_BC" name="Determine_batch_correction" version="2.2.3"> | |
| 2 <description>to choose between linear, lowess and loess methods</description> | |
| 3 | |
| 4 <requirements> | |
| 5 <requirement type="package" version="1.1_4">r-batch</requirement> | |
| 6 <requirement type="package" version="1.7_8">r-ade4</requirement> | |
| 7 <requirement type="package" version="1.70.0">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 <when value="hide"/> | |
| 42 </conditional> | |
| 43 </inputs> | |
| 44 | |
| 45 <outputs> | |
| 46 <data name="out_graph_pdf" label="Determine_BC_graph" format="pdf" ></data> | |
| 47 <data name="out_preNormSummary" label="Determine_BC_preNormSummary" format="tabular" ></data> | |
| 48 </outputs> | |
| 49 | |
| 50 <tests> | |
| 51 <test> | |
| 52 <param name="dataMatrix" value="input-determinebc-dataMatrix.tsv"/> | |
| 53 <param name="sampleMetadata" value="input-determinebc-sampleMetadata.tsv"/> | |
| 54 <param name="ref_factor" value="batch"/> | |
| 55 <param name="option" value="hide"/> | |
| 56 <param name="span" value="none"/> | |
| 57 <output name="out_preNormSummary" file="output-determinebc-preNormSummary.txt"/> | |
| 58 </test> | |
| 59 </tests> | |
| 60 | |
| 61 <help> | |
| 62 | |
| 63 .. class:: infomark | |
| 64 | |
| 65 **Authors** | |
| 66 | Jean-Francois Martin - PF MetaToul-AXIOM ; INRA ; MetaboHUB (for original version of this tool and overall development of the R script) | |
| 67 | |
| 68 .. class:: infomark | |
| 69 | |
| 70 **Contributors** | |
| 71 | Melanie Petera - PFEM ; INRA ; MetaboHUB (for R wrapper and R script improvement) | |
| 72 | |
| 73 .. class:: infomark | |
| 74 | |
| 75 **Wrapping** | |
| 76 | Marion Landi - FLAME ; PFEM ; INRA ; MetaboHUB (for xml interface and R wrapper) | |
| 77 | Franck Giacomoni - PFEM ; INRA ; MetaboHUB (for xml interface and R wrapper) | |
| 78 | |
| 79 --------------------------------------------------- | |
| 80 | |
| 81 .. class:: infomark | |
| 82 | |
| 83 **Please cite** If you use this tool, please cite: | |
| 84 | `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>`_ | |
| 85 | |
| 86 --------------------------------------------------- | |
| 87 | |
| 88 ========================== | |
| 89 Determine_batch_correction | |
| 90 ========================== | |
| 91 | |
| 92 ----------- | |
| 93 Description | |
| 94 ----------- | |
| 95 | |
| 96 | Allows to choose between linear or non-linear (lowess or loess) functions for batch correction | |
| 97 | using quality control pooled samples (QC-pools) with correction algorithm as mentioned by Van Der Kloet (J Prot Res 2009). | |
| 98 | | |
| 99 | Warning : this module does *not* deliver which choice should be made in model type; | |
| 100 | it only provides tools to help users to determine which choice may be appropriate, based on their own expertise. | |
| 101 | | |
| 102 | This tool is meant to be used prior to the Batch_correction tool to help make a choice in parameters, | |
| 103 | but it is not a requirement and thus can be avoided. | |
| 104 | |
| 105 | |
| 106 ----------------- | |
| 107 Workflow position | |
| 108 ----------------- | |
| 109 | |
| 110 .. image:: determine_batch_correction.png | |
| 111 :width: 800 | |
| 112 | |
| 113 | |
| 114 ----------- | |
| 115 Input files | |
| 116 ----------- | |
| 117 | |
| 118 +--------------------------+-----------+ | |
| 119 | Parameter : num + label | Format | | |
| 120 +==========================+===========+ | |
| 121 | 1 : Data Matrix file | tabular | | |
| 122 +--------------------------+-----------+ | |
| 123 | 2 : Sample metadata file | tabular | | |
| 124 +--------------------------+-----------+ | |
| 125 | |
| 126 | |
| 127 Data Matrix file must contain the intensity values of the variables. | |
| 128 | First line must contain all the samples' names | |
| 129 | First column must contain all the variables' ID | |
| 130 | | |
| 131 | |
| 132 Sample metadata file must contain at least the three following columns: | |
| 133 | "batch" to identify the batches of analyses | |
| 134 | "injectionOrder" (integers) defining the injection order of all samples (QC-pools as well as analysed samples) | |
| 135 | "sampleType" indicating if a sample ("sample") or a QC-pool ("pool"); each batch needs | |
| 136 | at least 3 QC-pools for intra-batch linear adjustment and 8 for lo(w)ess adjustment | |
| 137 | |
| 138 | |
| 139 .. class:: warningmark | |
| 140 | |
| 141 NO MISSING DATA are allowed | |
| 142 | |
| 143 | |
| 144 ---------- | |
| 145 Parameters | |
| 146 ---------- | |
| 147 | |
| 148 Factor of interest | |
| 149 | name of the factor (column header) that will be used as a categorical variable for plots. | |
| 150 | (often a biological factor ; if none, leave “batch”). | |
| 151 | This factor does not affect correction calculation. | |
| 152 | | |
| 153 | |
| 154 Advanced options | |
| 155 | should only be put at "show" if you have good understanding of the span parameter and are willing to adjust it. | |
| 156 | | |
| 157 | |
| 158 Span | |
| 159 | - when advanced option is at "hide" (default) | |
| 160 | default is 1 for loess regression and is two times the ratio between number of pools and number of samples for lowess regression. | |
| 161 | - when advanced option is at "show" : | |
| 162 | filled value is used for lowess and loess regression. | |
| 163 | |
| 164 | |
| 165 ------------ | |
| 166 Output files | |
| 167 ------------ | |
| 168 | |
| 169 Determine_BC_preNormSummary.tabular | |
| 170 | tabular output | |
| 171 | Meaning of results of diagnosis analysis | |
| 172 | 0 : no preliminary-condition problem | |
| 173 | 1 : standard deviation of QC-pools or samples = 0 | |
| 174 | 2 : insufficient number of QC-pools within a batch (n=3 for linear, n=8 for lowess or loess) | |
| 175 | 3 : significant difference between QC-pools and samples means | |
| 176 | 4 : denominator =0 when on 1 pool per batch non-0 | |
| 177 | 5 : (linear regression only) the slopes ratio “QC-pools/samples” is lower than -0.2 | |
| 178 | | |
| 179 | |
| 180 Determine_BC_graph.pdf | |
| 181 | graphical output | |
| 182 | One page per ion. Plots regression curves for all methods allowed and plot.design results regarding the factor of interest. | |
| 183 | |
| 184 | |
| 185 --------------------------------------------------- | |
| 186 | |
| 187 --------------- | |
| 188 Working example | |
| 189 --------------- | |
| 190 | |
| 191 | |
| 192 .. class:: warningmark | |
| 193 | |
| 194 Refer to the corresponding "W4M HowTo" page: | |
| 195 | `MS data processing - Filters and normalisation <http://workflow4metabolomics.org/sites/workflow4metabolomics.org/files/files/w4e-2016-data_processing.pdf>`_ | |
| 196 | | |
| 197 | | |
| 198 | |
| 199 | |
| 200 </help> | |
| 201 | |
| 202 <!-- [RECOMMANDED] All citations associated to this tool (main citation given above and other references). Can be extracted from the history panel --> | |
| 203 <citations> | |
| 204 <!-- [HELP] As DOI or BibTex entry --> | |
| 205 <citation type="doi">10.1021/pr900499r</citation> | |
| 206 </citations> | |
| 207 | |
| 208 <!-- | |
| 209 Input files | |
| 210 =========== | |
| 211 | |
| 212 | **These two input files can be used in the purview "URL/Text:" of the tool "Get Data/Upload File",** | |
| 213 | **by checking the box "Convert spaces to tabs: YES"** | |
| 214 | |
| 215 Metadata_samples.txt | |
| 216 Model input Sample metadata file:: | |
| 217 | |
| 218 samples idLIMS serie factor01 factor02 batch injectionOrder sampleType | |
| 219 POOL1 POOL1 pool p pool 01_08_2011 1 p | |
| 220 X12588 12588 3 validation 2 01_08_2011 2 s | |
| 221 X17736 17736 3 Q1 1 01_08_2011 3 s | |
| 222 X15432 15432 3 validation 1 01_08_2011 4 s | |
| 223 X17159 17159 3 Q4 1 01_08_2011 5 s | |
| 224 X14325 14325 3 validation 2 01_08_2011 6 s | |
| 225 X17419 17419 3 Q4 1 01_08_2011 7 s | |
| 226 X16437 16437 3 Q4 1 01_08_2011 8 s | |
| 227 X16172 16172 3 Q4 2 01_08_2011 9 s | |
| 228 X16392 16392 3 Q4 2 01_08_2011 10 s | |
| 229 X13875 13875 3 validation 2 01_08_2011 11 s | |
| 230 POOL2 POOL2 pool p pool 01_08_2011 12 p | |
| 231 X13117 13117 3 Q4 2 01_08_2011 13 s | |
| 232 X13341 13341 3 Q1 2 01_08_2011 14 s | |
| 233 X16888 16888 3 Q4 1 01_08_2011 15 s | |
| 234 X17489 17489 3 Q4 2 01_08_2011 16 s | |
| 235 X12718 12718 3 Q1 2 01_08_2011 17 s | |
| 236 X16235 16235 3 Q4 2 01_08_2011 18 s | |
| 237 X16878 16878 3 Q1 1 01_08_2011 19 s | |
| 238 X12701 12701 3 validation 1 01_08_2011 20 s | |
| 239 X16220 16220 3 Q4 2 01_08_2011 21 s | |
| 240 X15635 15635 3 Q4 1 01_08_2011 22 s | |
| 241 | |
| 242 | |
| 243 Intensity_matrix.txt | |
| 244 Model input Matrix Ions file BEFORE IMPLEMENTATION:: | |
| 245 | |
| 246 samples POOL1 X12588 X17736 X15432 X17159 X14325 X17419 X16437 X16172 X16392 X13875 POOL2 X13117 X13341 X16888 X17489 X12718 X16235 X16878 X12701 X16220 X15635 | |
| 247 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 | |
| 248 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 | |
| 249 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 | |
| 250 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 | |
| 251 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 | |
| 252 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 | |
| 253 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 | |
| 254 | |
| 255 | |
| 256 Parameters | |
| 257 ========== | |
| 258 | |
| 259 Factor analysis -> **batch** | |
| 260 | |
| 261 | |
| 262 Output files | |
| 263 ============ | |
| 264 | |
| 265 out_preNormSummary.tabular: | |
| 266 | |
| 267 ====== ============== ============== | |
| 268 labion batch.1.linear batch.1.lowess | |
| 269 ====== ============== ============== | |
| 270 ion01 2 2 | |
| 271 ion02 2 2 | |
| 272 ion03 2 2 | |
| 273 ion04 2 2 | |
| 274 ion05 1 1 | |
| 275 ... ... ... | |
| 276 ====== ============== ============== | |
| 277 | |
| 278 | |
| 279 out_graph_pdf.pdf | |
| 280 | |
| 281 .. image:: ./static/images/metabolomics/pdf_plotsituation.png | |
| 282 :width: 800 | |
| 283 --> | |
| 284 | |
| 285 </tool> |
