0
+ − 1 <tool id="metams_lcms_pick_and_group" name="METAMS-LC/MS Pick, Align and Group" version="0.0.4">
+ − 2 <description> Runs metaMS process for LC/MS feature picking, aligning and grouping</description>
+ − 3 <requirements>
+ − 4 <requirement type="package" version="3.1.1">R_bioc_metams</requirement>
+ − 5 </requirements>
+ − 6 <command interpreter="Rscript">
+ − 7 metaMS_cmd_pick_and_group.r
+ − 8 $data_files
+ − 9 $customMetaMSsettings
+ − 10 $outputFile
+ − 11 $xsetOut
+ − 12 $polarity
+ − 13 $htmlReportFile
+ − 14 $htmlReportFile.files_path
+ − 15 $outputLog
+ − 16 </command>
+ − 17 <inputs>
+ − 18 <param name="data_files" type="data" format="prims.fileset.zip" label="Data files (.zip file with CDF, mzML or mzXML files)" help=".zip file containing the CDF, mzML or mzXML files of the new measurements"/>
+ − 19
+ − 20 <param name="protocolName" type="text" size="30" label="protocolName" value="e.g. Synapt.QTOF.RP"
+ − 21 help="Choose a name to give for the specific settings in the parameters below"/><!-- TODO - let user choose this -->
+ − 22
+ − 23 <param name="polarity" type="select" size="30" label="polarity"
+ − 24 help="Which polarity mode was used for measuring of the ms sample">
+ − 25 <option value="positive" selected="true">positive</option>
+ − 26 <option value="negative" >negative</option>
+ − 27 </param>
+ − 28
+ − 29
+ − 30 <!-- ===========NB : if peak picking, alignment OR CAMERA settings have to be reused for runGC wrapper in the future, we can use Galaxy macro expansions here
+ − 31 to avoid defining these parameters again in the runGC wrapper ========================= -->
+ − 32 <conditional name="peakPicking">
+ − 33 <param name="method" type="select" size="30" label="PEAK PICKING method ====================================================="
+ − 34 help="matchedFilter=Feature detection in the chromatographic time domain ; centWave=Feature detection for high resolution LC/MS data">
+ − 35 <option value="matchedFilter" selected="true">matchedFilter</option>
+ − 36 <option value="centWave" >centWave</option>
+ − 37 </param>
+ − 38 <when value="matchedFilter">
+ − 39 <param name="fwhm" type="integer" size="10" value="20" label="fwhm"
+ − 40 help="full width at half maximum of matched filtration gaussian model peak. Only used to calculate the actual sigma" />
+ − 41 <param name="sigma_denom" type="float" size="10" value="2.3548" label="sigma_denominator"
+ − 42 help="denominator for standard deviation (width) of matched filtration model peak (e.g. sigma = fwhm/2.3548)" />
+ − 43 <param name="max" type="integer" size="10" value="50" label="max"
+ − 44 help="maximum number of peaks per extracted ion chromatogram" />
+ − 45 <param name="snthresh" type="integer" size="10" value="4" label="snthresh"
+ − 46 help="signal to noise ratio cutoff" />
+ − 47 <param name="step" type="float" size="10" value="0.05" label="step"
+ − 48 help="step size to use for profile generation"/>
+ − 49 <param name="steps" type="integer" size="10" value="2" label="steps"
+ − 50 help="number of steps to merge prior to filtration"/>
+ − 51 <param name="mzdiff" type="float" size="10" value="0.8" label="mzdiff"
+ − 52 help="minimum difference in m/z for peaks with overlapping retention times"/>
+ − 53 </when>
+ − 54 <when value="centWave">
+ − 55 <param name="ppm" type="integer" size="10" value="25" label="ppm"
+ − 56 help="maxmial tolerated m/z deviation in consecutive scans, in ppm" />
+ − 57 <param name="peakwidth" type="text" size="10" value="20,50" label="peakwidth"
+ − 58 help="Chromatographic peak width, given as range (min,max) in seconds" />
+ − 59 <param name="snthresh" type="integer" size="10" value="10" label="snthresh"
+ − 60 help="signal to noise ratio cutoff" />
+ − 61 <param name="prefilter" type="text" size="10" value="3,100" label="prefilter=c(k,I)"
+ − 62 help="Prefilter step for the first phase. Mass traces are only retained if
+ − 63 they contain at least k peaks with intensity > = I" />
+ − 64 <param name="mzCenterFun" type="select" size="30" label="mzCenterFun"
+ − 65 help="Function to calculate the m/z center of the feature: wMean intensity weighted mean of the
+ − 66 feature m/z values, mean mean of the feature m/z values, apex use m/z value at peak apex,
+ − 67 wMeanApex3 intensity weighted mean of the m/z value at peak apex and the m/z value left and
+ − 68 right of it, meanApex3 mean of the m/z value at peak apex and the m/z value left and right of it">
+ − 69 <option value="wMean" selected="true">wMean</option>
+ − 70 <option value="mean" >mean</option>
+ − 71 <option value="apex" >apex</option>
+ − 72 <option value="wMeanApex3" >wMeanApex3</option>
+ − 73 <option value="meanApex3" >meanApex3</option>
+ − 74 </param>
+ − 75 <param name="integrate" type="select" size="30" label="integrate"
+ − 76 help="Integration method. If =1 peak limits are found through descent
+ − 77 on the mexican hat filtered data, if =2 the descent is done on the real data.
+ − 78 Method 2 is very accurate but prone to noise, while method 1 is more robust to noise but less exact">
+ − 79 <option value="1" selected="true">1</option>
+ − 80 <option value="2" >2</option>
+ − 81 </param>
+ − 82 <param name="mzdiff" type="float" size="10" value="-0.001" label="mzdiff"
+ − 83 help="minimum difference in m/z for peaks with overlapping retention times, can be negative to allow overlap" />
+ − 84 <param name="fitgauss" type="integer" size="10" value="20" label="fitgauss"
+ − 85 help="logical, if Yes: a Gaussian is fitted to each peak" >
+ − 86 <option value="TRUE" selected="true">Yes</option>
+ − 87 <option value="FALSE" >No</option>
+ − 88 </param>
+ − 89 <param name="noise" type="integer" size="10" value="0" label="noise"
+ − 90 help="optional argument which is useful for data that was centroided without any intensity
+ − 91 threshold, centroids with intensity < noise are omitted from ROI detection" />
+ − 92 </when>
+ − 93 </conditional>
+ − 94
+ − 95
+ − 96 <param name="min_class_fraction" type="float" size="10" value="0.3" label="ALIGNMENT min.class.fraction ====================================================="
+ − 97 help="Minimum fraction of samples necessary in the alignment to make it a valid alignment/group"/>
+ − 98 <param name="min_class_size" type="integer" size="10" value="3" label="min.class.size"
+ − 99 help="Minimum number of samples necessary in the alignment to make it a valid alignment/group. The lowest criteria
+ − 100 between this and min.class.fraction will be used." />
+ − 101 <param name="mzwid" type="float" size="10" value="0.1" label="mzwid"
+ − 102 help="width of overlapping m/z slices to use for creating peak density chromatograms and grouping peaks across samples"/>
+ − 103 <param name="bws" type="text" size="10" value="30,10" label="bws"
+ − 104 help="bandwidth (standard deviation or half width at half maximum) of gaussian smoothing kernel
+ − 105 to apply to the peak density chromatogram. Fill in two values separated by comma. First value is used for
+ − 106 first grouping round, seccond value is used for last grouping/alignment round after retention time
+ − 107 correction. "/>
+ − 108
+ − 109 <conditional name="retcor">
+ − 110 <param name="retcormethod" type="select" size="30" label="retcormethod"
+ − 111 help="retention time correction method. 'peakgroups' is the default density based approach, 'obiwarp' is
+ − 112 alignment data by Ordered Bijective Interpolated Warping ">
+ − 113 <option value="peakgroups" selected="true">peakgroups</option>
+ − 114 <option value="obiwarp" >obiwarp</option>
+ − 115 </param>
+ − 116 <when value="peakgroups">
+ − 117 <param name="retcorfamily" type="select" size="30" label="retcorfamily"
+ − 118 help="retention time correction method type/family">
+ − 119 <option value="symmetric" selected="true">symmetric</option>
+ − 120 <option value="gaussian">gaussian</option>
+ − 121 </param>
+ − 122 <param name="smooth" type="select" size="30" label="smooth"
+ − 123 help="either 'loess' for non-linear alignment or 'linear' for linear alignment">
+ − 124 <option value="linear" selected="true">linear</option>
+ − 125 <option value="loess">loess (TODO - waiting for metaMS to add/parse this option)</option>
+ − 126 </param>
+ − 127 <param name="missingratio" type="float" size="10" value="0.2" label="missingratio"
+ − 128 help="ratio of missing samples to allow in retention time correction groups"/>
+ − 129 <param name="extraratio" type="float" size="10" value="0.1" label="extraratio"
+ − 130 help="ratio of extra peaks to allow in retention time correction correction groups"/>
+ − 131 </when>
+ − 132 <when value="obiwarp">
+ − 133 <param name="profStep" type="integer" size="10" value="1" label="profStep"
+ − 134 help="step size (in m/z) to use for profile generation from the raw data files" />
+ − 135 </when>
+ − 136 </conditional>
+ − 137
+ − 138 <param name="fillPeaks" type="select" size="30" label="fillPeaks"
+ − 139 help="Fill missing peaks in peak groups/alignments that do not include peaks from every sample.
+ − 140 This method produces intensity values for those missing samples by integrating raw data in peak group region.">
+ − 141 <option value="TRUE" selected="true">Yes</option>
+ − 142 <option value="FALSE">No</option>
+ − 143 </param>
+ − 144 <param name="perfwhm" type="float" size="10" value="0.6" label="CAMERA perfwhm ====================================================="
+ − 145 help="percentage of FWHM width"/>
+ − 146 <param name="cor_eic_th" type="float" size="10" value="0.7" label="cor_eic_th"
+ − 147 help="correlation threshold (0..1)" />
+ − 148 <param name="ppm" type="float" size="10" value="5.0" label="ppm"
+ − 149 help="General ppm error" />
+ − 150
+ − 151 <param name="groupCorr_graphMethod" type="select" size="30" label="(groupCorr)graphMethod"
+ − 152 help="Method selection for grouping peaks after correlation analysis into pseudospectra.">
+ − 153 <option value="hcs" selected="true">hcs</option>
+ − 154 </param>
+ − 155
+ − 156 <param name="groupCorr_pval" type="float" size="10" value="0.05" label="(groupCorr)pval"
+ − 157 help="significant correlation threshold" />
+ − 158
+ − 159 <param name="groupCorr_calcCiS" type="select" size="30" label="(groupCorr)calcCiS"
+ − 160 help="Use correlation inside samples for peak grouping">
+ − 161 <option value="TRUE" selected="true">Yes</option>
+ − 162 <option value="FALSE">No</option>
+ − 163 </param>
+ − 164
+ − 165 <param name="groupCorr_calcIso" type="select" size="30" label="(groupCorr)calcIso"
+ − 166 help="Use isotopic relationship for peak grouping">
+ − 167 <option value="TRUE" >Yes</option>
+ − 168 <option value="FALSE" selected="true">No</option>
+ − 169 </param>
+ − 170
+ − 171 <param name="groupCorr_calcCaS" type="select" size="30" label="(groupCorr)calcCaS"
+ − 172 help="Use correlation across samples for peak grouping">
+ − 173 <option value="TRUE" >Yes</option>
+ − 174 <option value="FALSE" selected="true">No</option>
+ − 175 </param>
+ − 176
+ − 177
+ − 178 <param name="findIsotopes_maxcharge" type="integer" size="10" value="3" label="(findIsotopes)maxcharge"
+ − 179 help="max. ion charge" />
+ − 180
+ − 181 <param name="findIsotopes_maxiso" type="integer" size="10" value="4" label="(findIsotopes)maxiso"
+ − 182 help="max. number of expected isotopes" />
+ − 183
+ − 184 <param name="findIsotopes_minfrac" type="float" size="10" value="0.5" label="(findIsotopes)minfrac"
+ − 185 help="The ratio for the number of samples, which must satisfy the C12/C13 rule for isotope annotation" />
+ − 186
+ − 187
+ − 188 <param name="findAdducts_multiplier" type="integer" size="10" value="3" label="(findAdducts)multiplier"
+ − 189 help="If no ruleset is provided, calculate ruleset with max. number n of [nM+x] clusterions" />
+ − 190
+ − 191
+ − 192
+ − 193 </inputs>
+ − 194 <configfiles>
+ − 195
+ − 196 <configfile name="customMetaMSsettings">## ====================================
+ − 197 ## metaMS process settings
+ − 198 customMetaMSsettings <- metaMSsettings(protocolName = "${protocolName}",
+ − 199 chrom = "LC",
+ − 200 PeakPicking = list(
+ − 201 method = "${peakPicking.method}",
+ − 202 #if $peakPicking.method == "matchedFilter"
+ − 203 fwhm = ${peakPicking.fwhm},
+ − 204 sigma = ${peakPicking.fwhm}/${peakPicking.sigma_denom},
+ − 205 max = ${peakPicking.max},
+ − 206 snthresh = ${peakPicking.snthresh},
+ − 207 step = ${peakPicking.step},
+ − 208 steps = ${peakPicking.steps},
+ − 209 mzdiff = ${peakPicking.mzdiff}),
+ − 210 #else
+ − 211 ppm = ${peakPicking.ppm},
+ − 212 peakwidth = c(${peakPicking.peakwidth}),
+ − 213 snthresh = ${peakPicking.snthresh},
+ − 214 prefilter = c(${peakPicking.prefilter}),
+ − 215 mzCenterFun = "${peakPicking.mzCenterFun}",
+ − 216 integrate = ${peakPicking.integrate},
+ − 217 mzdiff = ${peakPicking.mzdiff},
+ − 218 fitgauss = ${peakPicking.fitgauss},
+ − 219 noise = ${peakPicking.noise}),
+ − 220 #end if
+ − 221 Alignment = list(
+ − 222 min.class.fraction = ${min_class_fraction},
+ − 223 min.class.size = ${min_class_size},
+ − 224 mzwid = ${mzwid},
+ − 225 bws = c(${bws}),
+ − 226 retcormethod = "${retcor.retcormethod}",
+ − 227 #if $retcor.retcormethod == "peakgroups"
+ − 228 smooth = "${retcor.smooth}",
+ − 229 missingratio = ${retcor.missingratio},
+ − 230 extraratio = ${retcor.extraratio},
+ − 231 retcorfamily = "${retcor.retcorfamily}",
+ − 232 #else
+ − 233 ##repeating the method as workaround/ backwards compatibility (can remove this one after fix from metaMS):
+ − 234 method = "${retcor.retcormethod}",
+ − 235 profStep = ${retcor.profStep},
+ − 236 #end if
+ − 237 fillPeaks = ${fillPeaks}),
+ − 238 CAMERA = list(
+ − 239 perfwhm = ${perfwhm},
+ − 240 cor_eic_th = ${cor_eic_th},
+ − 241 ppm= ${ppm},
+ − 242 graphMethod= "${groupCorr_graphMethod}",
+ − 243 pval= ${groupCorr_pval},
+ − 244 calcCiS= ${groupCorr_calcCiS},
+ − 245 calcIso= ${groupCorr_calcIso},
+ − 246 calcCaS= ${groupCorr_calcCaS},
+ − 247 maxcharge= ${findIsotopes_maxcharge},
+ − 248 maxiso= ${findIsotopes_maxiso},
+ − 249 minfrac= ${findIsotopes_minfrac},
+ − 250 multiplier= ${findAdducts_multiplier}
+ − 251 ))</configfile>
+ − 252
+ − 253 </configfiles>
+ − 254
+ − 255 <outputs>
+ − 256 <data name="outputFile" format="tabular" label="${tool.name} on ${on_string} - peaks table (TSV)"/>
+ − 257 <data name="outputLog" format="txt" label="${tool.name} on ${on_string} - LOG" hidden="True"/>
+ − 258 <data name="xsetOut" format="rdata" label="${tool.name} on ${on_string} - xcmsSet (RDATA)"/>
+ − 259 <data name="htmlReportFile" format="html" label="${tool.name} on ${on_string} - report (HTML)"/>
+ − 260 </outputs>
+ − 261 <tests>
+ − 262 <test>
+ − 263 </test>
+ − 264 </tests>
+ − 265 <help>
+ − 266
+ − 267 .. class:: infomark
+ − 268
+ − 269 Runs metaMS process for LC/MS feature feature picking, aligning and grouping.
+ − 270 This part of the metaMS process makes use of the XCMS and CAMERA tools and algorithms.
+ − 271 CAMERA is used for automatic deconvolution/annotation of LC/ESI-MS data.
+ − 272 The figure below shows the main parts of the metaMS process wrapped by this tool.
+ − 273
+ − 274 .. image:: $PATH_TO_IMAGES/metaMS_pick_align_camera.png
+ − 275
+ − 276
+ − 277 From CAMERA documentation:
+ − 278
+ − 279 .. image:: $PATH_TO_IMAGES/CAMERA_results.png
+ − 280
+ − 281 **References**
+ − 282
+ − 283 If you use this Galaxy tool in work leading to a scientific publication please
+ − 284 cite the following papers:
+ − 285
+ − 286 Wehrens, R.; Weingart, G.; Mattivi, F. (2014).
+ − 287 metaMS: an open-source pipeline for GC-MS-based untargeted metabolomics.
+ − 288 Journal of chromatography B: biomedical sciences and applications, 996 (1): 109-116.
+ − 289 doi: 10.1016/j.jchromb.2014.02.051
+ − 290 handle: http://hdl.handle.net/10449/24012
+ − 291
+ − 292 Wrapper by Pieter Lukasse.
+ − 293
+ − 294
+ − 295 </help>
+ − 296 <citations>
+ − 297 <citation type="doi">10.1016/j.jchromb.2014.02.051</citation> <!-- example
+ − 298 see also https://wiki.galaxyproject.org/Admin/Tools/ToolConfigSyntax#A.3Ccitations.3E_tag_set
+ − 299 -->
+ − 300 </citations>
+ − 301 </tool>