comparison proteomiqon_psmbasedquantification.xml @ 0:65ce27f0fa01 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/proteomiqon_psmbasedquantification commit 2535f45b8a0f617a0525a88c195602a6a3978152"
author galaxyp
date Fri, 10 Sep 2021 05:41:32 +0000
parents
children 4abcc674fc0b
comparison
equal deleted inserted replaced
-1:000000000000 0:65ce27f0fa01
1 <tool id="proteomiqon_psmbasedquantification" name="Proteomiqon PSMBasedQuantification" version="@VERSION@" profile="20.05">
2 <description>
3 allows label-free quantification as well as quantification of full metabolic labeled samples.
4 </description>
5 <macros>
6 <token name="@VERSION@">0.0.7</token>
7 </macros>
8 <requirements>
9 <requirement type="package" version="@VERSION@">proteomiqon-psmbasedquantification</requirement>
10 </requirements>
11 <command detect_errors="exit_code"><![CDATA[
12 #import re
13 #set instrumentOutput_basename = $re.sub(r'[^\w ,.\-+]','_',$instrumentOutput.element_identifier)
14 #set scoredPSMs_basename = $re.sub(r'[^\w ,.\-+]','_',$scoredPSMs.element_identifier)
15 #set peptideDB_basename = $re.sub(r'[^\w ,.\-+]','_',$peptideDB.element_identifier)
16 #if $outputParamfile:
17 cat '$paramfile' >> '$out_paramfile' &&
18 #end if
19 ln -s '$instrumentOutput' '${instrumentOutput_basename}.mzlite' &&
20 ln -s '$scoredPSMs' '${scoredPSMs_basename}.qpsm' &&
21 ln -s '$peptideDB' '${peptideDB_basename}.db' &&
22 ln -s '$out_quant' '${instrumentOutput_basename}.quant' &&
23 proteomiqon-psmbasedquantification -i './${instrumentOutput_basename}.mzlite' -ii './${scoredPSMs_basename}.qpsm' -d './${peptideDB_basename}.db' -p '$paramfile' -o ./
24 ]]>
25 </command>
26 <configfiles>
27 <configfile name="paramfile">
28 <![CDATA[
29 {
30 "PerformLabeledQuantification": ${PerformLabeledQuantification},
31 "XicExtraction":
32 {
33 "ScanTimeWindow": ${XicExtraction.ScanTimeWindow},
34 "MzWindow_Da": {
35 "Case": "${XicExtraction.MzWindow_DaTypeCond.MzWindow_DaType}",
36 #if $XicExtraction.MzWindow_DaTypeCond.MzWindow_DaType == "Fixed"
37 "Fields": [
38 ${XicExtraction.MzWindow_DaTypeCond.MzWindow_Da}
39 ]
40 #end if
41 },
42 "XicProcessing": {
43 #if $XicExtraction.XicProcessing.ProcessingTypeCond.ProcessingType == "Wavelet"
44 "Case": "Wavelet",
45 "Fields": [
46 {
47 #if $XicExtraction.XicProcessing.ProcessingTypeCond.BorderPadding
48 "Borderpadding": {
49 "Case": "Some",
50 "Fields": [
51 ${XicExtraction.XicProcessing.ProcessingTypeCond.BorderPadding}
52 ]
53 },
54 #else
55 "Borderpadding": null,
56 #end if
57 "BorderPadMethod": {
58 "Case": "${XicExtraction.XicProcessing.ProcessingTypeCond.BorderPadMethod}"
59 },
60 "InternalPaddingMethod": {
61 "Case": "${XicExtraction.XicProcessing.ProcessingTypeCond.InternalPaddingMethod}"
62 },
63 "HugeGapPaddingMethod": {
64 "Case": "${XicExtraction.XicProcessing.ProcessingTypeCond.HugeGapPaddingMethod}"
65 },
66 "HugeGapPaddingDistance": ${XicExtraction.XicProcessing.ProcessingTypeCond.HugeGapPaddingDistance},
67 #if $XicExtraction.XicProcessing.ProcessingTypeCond.MinPeakDistance
68 "MinPeakDistance": {
69 "Case": "Some",
70 "Fields": [
71 ${XicExtraction.XicProcessing.ProcessingTypeCond.MinPeakDistance},
72 ]
73 },
74 #else
75 "MinPeakDistance": null,
76 #end if
77 #if $XicExtraction.XicProcessing.ProcessingTypeCond.MinPeakLength
78 "MinPeakLength": {
79 "Case": "Some",
80 "Fields": [
81 ${XicExtraction.XicProcessing.ProcessingTypeCond.MinPeakLength}
82 ]
83 },
84 #else
85 "MinPeakLength": null,
86 #end if
87 "MaxPeakLength": ${XicExtraction.XicProcessing.ProcessingTypeCond.MaxPeakLength},
88 "NoiseQuantile": ${XicExtraction.XicProcessing.ProcessingTypeCond.NoiseQuantile},
89 "MinSNR": ${XicExtraction.XicProcessing.ProcessingTypeCond.MinSNR},
90 }
91 ]
92 #else
93 "Case": "SecondDerivative",
94 "Fields": [
95 {
96 "MinSNR": ${XicExtraction.XicProcessing.ProcessingTypeCond.MinSNR},
97 "PolynomOrder": ${XicExtraction.XicProcessing.ProcessingTypeCond.PolynomOrder},
98 "WindowSize": {
99 "Case": "${XicExtraction.XicProcessing.ProcessingTypeCond.WindowSizeCond.WindowSizeType}",
100 "Fields" : [
101 ${XicExtraction.XicProcessing.ProcessingTypeCond.WindowSizeCond.WindowSize}
102 ]
103 }
104 }
105 ]
106 #end if
107 },
108 #if $XicExtraction.TopKPSMs
109 "TopKPSMs": {
110 "Case": "Some",
111 "Fields": [
112 ${XicExtraction.TopKPSMs}
113 ]
114 }
115 #else
116 "TopKPSMs": null
117 #end if
118 },
119 #if $BaseLineCorrectionCond.BaseLineCorrectionEnabled == "yes"
120 "BaseLineCorrection": {
121 "Case": "Some",
122 "Fields": [
123 {
124 "MaxIterations":$BaseLineCorrectionCond.MaxIterations,
125 "Lambda":$BaseLineCorrectionCond.Lambda,
126 "P":$BaseLineCorrectionCond.P
127 }
128 ]
129 }
130 #else
131 "BaseLineCorrection": null
132 #end if
133 }
134 ]]>
135 </configfile>
136 </configfiles>
137 <inputs>
138 <param name="instrumentOutput" type="data" format="sqlite" label="Instrument output" help="Specify mass spectrometry data you want to analyze."/>
139 <param name="scoredPSMs" type="data" format="tabular" label="Scored PSM file" help="Specify list of peptide identifications."/>
140 <param name="peptideDB" type="data" format="sqlite" label="Peptide database" help="Specify the peptide data base."/>
141 <param name="PerformLabeledQuantification" type="boolean" checked="true" label="Perform labeled quantification" help="If checked, a quantification of peptides which contain an isotopic modification is performed. Additionally, for every identified peptide we check if the mass spectrometry run contains a peak at the m/z of the labeled/unlabeled counterpart and quantify it."/>
142 <section name="XicExtraction" title="XIC extraction">
143 <param name="ScanTimeWindow" type="float" value="2.0" label="Scan timewindow" help="Specify the length of the scan time window used for XIC creation."/>
144 <conditional name="MzWindow_DaTypeCond">
145 <param name="MzWindow_DaType" type="select" label="MzWindow_Da type" help="Specify the MzWindow Da Type">
146 <option value="Fixed" selected="true">Fixed</option>
147 <option value="Estimate">Estimate</option>
148 </param>
149 <when value="Fixed">
150 <param name="MzWindow_Da" type="float" value="0.07" label="Window width" help="Specify the m/z window set centered on the target m/z used for XIC creation" />
151 </when>
152 <when value="Estimate">
153 </when>
154 </conditional>
155 <section name="XicProcessing" title="Xic processing">
156 <conditional name="ProcessingTypeCond">
157 <param name="ProcessingType" type="select" label="Processing type">
158 <option value="SecondDerivative">Second Derivative</option>
159 <option value="Wavelet" selected="true">Wavelet</option>
160 </param>
161 <when value="SecondDerivative">
162 <param name="MinSNR" type="float" value="2.0" label="Min SNR" />
163 <param name="PolynomOrder" type="integer" value="2" label="Polynom order" />
164 <conditional name="WindowSizeCond">
165 <param name="WindowSizeType" type="select" label="Window size type">
166 <option value="Fixed" selected="true">Fixed</option>
167 <option value="EstimateUsingAutoCorrelation">Estimate using auto correlation</option>
168 </param>
169 <when value="Fixed">
170 <param name="WindowSize" type="integer" value="11" label="Value" />
171 </when>
172 <when value="EstimateUsingAutoCorrelation">
173 <param name="WindowSize" type="float" value="11.0" label="Value" />
174 </when>
175 </conditional>
176 </when>
177 <when value="Wavelet">
178 <param name="BorderPadding" type="integer" value="2" optional="true" label="Border padding amount" />
179 <param name="BorderPadMethod" type="select" label="Border padding method">
180 <option value="Random" selected="true">Random</option>
181 <option value="Zero">Zero</option>
182 </param>
183 <param name="InternalPaddingMethod" type="select" label="Internal padding method">
184 <option value="Random">Random</option>
185 <option value="NaN">NaN</option>
186 <option value="Delete">Delete</option>
187 <option value="Zero">Zero</option>
188 <option value="LinearInterpolation" selected="true">Linear Interpolation</option>
189 </param>
190 <param name="HugeGapPaddingMethod" type="select" label="Huge gap padding method">
191 <option value="Random">Random</option>
192 <option value="NaN">NaN</option>
193 <option value="Delete">Delete</option>
194 <option value="Zero" selected="true">Zero</option>
195 <option value="LinearInterpolation">Linear Interpolation</option>
196 </param>
197 <param name="HugeGapPaddingDistance" type="float" value="100.0" label="Huge gap padding distance" />
198 <param name="MinPeakDistance" type="float" value="" optional="true" label="Min peak distance" />
199 <param name="MinPeakLength" type="float" value="0.1" optional="true" label="Min peak length" />
200 <param name="MaxPeakLength" type="float" value="1.5" label="Max peak length" />
201 <param name="NoiseQuantile" type="float" value="0.01" label="Noise quantile" />
202 <param name="MinSNR" type="float" value="0.01" label="Min SNR" />
203 </when>
204 </conditional>
205 </section>
206 <param name="TopKPSMs" type="integer" value="3" optional="true" label="Top KPSMs" />
207 </section>
208 <conditional name="BaseLineCorrectionCond">
209 <param name="BaseLineCorrectionEnabled" type="select" label="Use baseline correction">
210 <option value="yes" selected="true">Yes</option>
211 <option value="no">No</option>
212 </param>
213 <when value="yes">
214 <param name="MaxIterations" type="integer" value="10" label="Max iterations" />
215 <param name="Lambda" type="integer" value="6" label="Lambda" />
216 <param name="P" type="float" value="0.05" label="P" />
217 </when>
218 <when value="no">
219 </when>
220 </conditional>
221 <param name="outputParamfile" type="boolean" value="false" label="Output parameter file"/>
222 </inputs>
223 <outputs>
224 <data format="tabular" name="out_quant" />
225 <data format="json" name="out_paramfile">
226 <filter>outputParamfile</filter>
227 </data>
228 </outputs>
229 <tests>
230 <test expect_num_outputs="1">
231 <param name="instrumentOutput" value="sample.mzlite"/>
232 <param name="scoredPSMs" value="sample.qpsm"/>
233 <param name="peptideDB" value="sample.db"/>
234 <param name="PerformLabeledQuantification" value="true"/>
235 <section name="XicExtraction">
236 <param name="ScanTimeWindow" value="2.0"/>
237 <section name="XicProcessing">
238 <conditional name="ProcessingTypeCond">
239 <param name="ProcessingType" value="SecondDerivate" />
240 <param name="MinSNR" value="2.0"/>
241 <param name="PolynomOrder" value="2"/>
242 </conditional>
243 </section>
244 <conditional name="WindowSizeCond">
245 <param name="WindowSizeType" value="Fixed"/>
246 <param name="WindowSize" value="11"/>
247 </conditional>
248 </section>
249 <param name="TopKPSMs" value=""/>
250 <conditional name="BaseLineCorrectionCond">
251 <param name="BaseLineCorrectionEnabled" value="yes"/>
252 <param name="MaxIterations" value="10"/>
253 <param name="Lambda" value="6"/>
254 <param name="P" value="0.05"/>
255 </conditional>
256 <param name="outputParamfile" value="false"/>
257 </test>
258 <test expect_num_outputs="2">
259 <param name="instrumentOutput" value="sample.mzlite"/>
260 <param name="scoredPSMs" value="sample.qpsm"/>
261 <param name="peptideDB" value="sample.db"/>
262 <param name="PerformLabeledQuantification" value="true"/>
263 <section name="XicExtraction">
264 <param name="ScanTimeWindow" value="2.0"/>
265 <conditional name="MzWindow_DaTypeCond">
266 <param name="MzWindow_DaType" value="Fixed"/>
267 <param name="MzWindow_Da" value="0.07"/>
268 </conditional>
269 <section name="XicProcessing">
270 <conditional name="ProcessingTypeCond">
271 <param name="ProcessingType" value="SecondDerivative" />
272 <param name="MinSNR" value="2.0"/>
273 <param name="PolynomOrder" value="2"/>
274 </conditional>
275 </section>
276 <conditional name="WindowSizeCond">
277 <param name="WindowSizeType" value="Fixed"/>
278 <param name="WindowSize" value="11"/>
279 </conditional>
280 </section>
281 <param name="TopKPSMs" value=""/>
282 <conditional name="BaseLineCorrectionCond">
283 <param name="BaseLineCorrectionEnabled" value="yes"/>
284 <param name="MaxIterations" value="10"/>
285 <param name="Lambda" value="6"/>
286 <param name="P" value="0.05"/>
287 </conditional>
288 <param name="outputParamfile" value="true"/>
289 <output name="out_paramfile" file="result_1.json" />
290 </test>
291 <test expect_num_outputs="2">
292 <param name="instrumentOutput" value="sample.mzlite"/>
293 <param name="scoredPSMs" value="sample.qpsm"/>
294 <param name="peptideDB" value="sample.db"/>
295 <param name="PerformLabeledQuantification" value="true"/>
296 <section name="XicExtraction">
297 <param name="ScanTimeWindow" value="2.0"/>
298 <conditional name="MzWindow_DaTypeCond">
299 <param name="MzWindow_DaType" value="Estimate"/>
300 </conditional>
301 <section name="XicProcessing">
302 <conditional name="ProcessingTypeCond">
303 <param name="ProcessingType" value="Wavelet" />
304 <param name="BorderPadding" value="2"/>
305 <param name="BorderPadMethod" value="Random" />
306 <param name="InternalPaddingMethod" value="LinearInterpolation"/>
307 <param name="HugeGapPaddingMethod" value="Zero"/>
308 <param name="HugeGapPaddingDistance" value="100.0"/>
309 <param name="MinPeakDistance" value=""/>
310 <param name="MinPeakLength" value="0.1"/>
311 <param name="MaxPeakLength" value="1.5"/>
312 <param name="NoiseQuantile" value="0.01"/>
313 <param name="MinSNR" value="0.01" />
314 </conditional>
315 </section>
316 </section>
317 <param name="TopKPSMs" value="3"/>
318 <conditional name="BaseLineCorrectionCond">
319 <param name="BaseLineCorrectionEnabled" value="no"/>
320 </conditional>
321 <param name="outputParamfile" value="true"/>
322 <output name="out_paramfile" file="result_2.json" />
323 </test>
324 <test expect_num_outputs="2">
325 <param name="instrumentOutput" value="sample.mzlite"/>
326 <param name="scoredPSMs" value="sample.qpsm"/>
327 <param name="peptideDB" value="sample.db"/>
328 <param name="PerformLabeledQuantification" value="true"/>
329 <section name="XicExtraction">
330 <param name="ScanTimeWindow" value="2.0"/>
331 <conditional name="MzWindow_DaTypeCond">
332 <param name="MzWindow_DaType" value="Estimate"/>
333 </conditional>
334 <section name="XicProcessing">
335 <conditional name="ProcessingTypeCond">
336 <param name="ProcessingType" value="Wavelet" />
337 <param name="BorderPadding" value=""/>
338 <param name="BorderPadMethod" value="Zero" />
339 <param name="InternalPaddingMethod" value="Zero"/>
340 <param name="HugeGapPaddingMethod" value="Delete"/>
341 <param name="HugeGapPaddingDistance" value="101.0"/>
342 <param name="MinPeakDistance" value="2.0"/>
343 <param name="MinPeakLength" value=""/>
344 <param name="MaxPeakLength" value="1.5"/>
345 <param name="NoiseQuantile" value="0.01"/>
346 <param name="MinSNR" value="0.01" />
347 </conditional>
348 </section>
349 </section>
350 <param name="TopKPSMs" value=""/>
351 <conditional name="BaseLineCorrectionCond">
352 <param name="BaseLineCorrectionEnabled" value="no"/>
353 </conditional>
354 <param name="outputParamfile" value="true"/>
355 <output name="out_paramfile" file="result_3.json" />
356 </test>
357 </tests>
358 <help>
359 <![CDATA[
360 What It Does
361 ------------
362 **Disclaimer** Disclaimer this tool needs a `peptide database <https://csbiology.github.io/ProteomIQon/tools/PeptideDB.html>`_ and `peptide spectrum matches <https://csbiology.github.io/ProteomIQon/tools/PeptideSpectrumMatching.html>`_ which `passed fdr thresholds <https://csbiology.github.io/ProteomIQon/tools/PSMStatistics.html>`_.
363
364 Once a MS/MS spectrum is mapped to a peptide sequence the quantity of the fragmented peptide ion comes into view.
365
366 Given an MS run in the mzLite or mzml format and a list of fdr controlled peptide spectrum matches, this tool iterates accross all identified MS/MS scans and groups them by the assigned peptide ion.
367 The scan times of each MS/MS spectrum are then weighted according to the quality of each match to build an reliable estimator for the scan time of the peptide ion in question.
368 This scan time estimator, combined with the monoisotopic m/z, is then used to extract an ion chromatogram.
369 Using wavelet based peak detection techniques we identify all peaks present in the XIC and select the most probable peak our target for quantification.
370 Using parameter estimation techniques we subsequently use peak fitting to fit a set of two gaussian models to the detected peak, from whom the one with the better fit is selected.
371 This allows us not only to report how well the signal fitted to the theoretical expected peak shape but also to obtain accurate estimates for the peak area, our estimator for peptide ion abundance.
372
373 .. image:: LabeledQuant.png
374 :width: 768pt
375 :height: 228pt
376
377 The quantification tool was designed to allow label-free quantification as well as quantification of full metabolic labeled samples.
378 For this we use the known identity of one of the the peptide ions and calculate the m/z of the unobserved differentially labeled counterpart to extract and quantify the corresponding XIC.
379
380 Further Reading
381 ---------------
382 Additional information about the tool can be found in the `documentation <https://csbiology.github.io/ProteomIQon/tools/PSMBasedQuantification.html>`_.
383 ]]>
384 </help>
385 </tool>