comparison proteomiqon_mzmltomzlite.xml @ 0:529b61ba3d64 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/proteomIQon_MzMLToMzLite commit adc8b0dc45ba060c7c82ab3df028141339956475"
author galaxyp
date Wed, 30 Jun 2021 16:31:24 +0000
parents
children acb8aba959ed
comparison
equal deleted inserted replaced
-1:000000000000 0:529b61ba3d64
1 <tool id="proteomiqon_mzmltomzlite" name="ProteomIQon MzMLToMzLite" version="@VERSION@" python_template_version="20.05">
2 <description>
3 converts mzML files to mzLite files.
4 </description>
5 <macros>
6 <token name="@VERSION@">0.0.5</token>
7 </macros>
8 <requirements>
9 <requirement type="package" version="@VERSION@">proteomiqon-mzmltomzlite</requirement>
10 </requirements>
11 <command detect_errors="exit_code"><![CDATA[
12 #import re
13 #set basename = $re.sub(r'[^\w ,.\-+]','_',$instrumentOutput.element_identifier)
14 #if $outputParamfile:
15 cat '$paramfile' >> '$out_paramfile' &&
16 #end if
17 ln -s $instrumentOutput '${basename}.mzML' &&
18 ln -s $out_mzlite '${basename}.mzlite' &&
19 proteomiqon-mzmltomzlite -i './${basename}.mzML' -p $paramfile -o ./
20 ]]>
21 </command>
22 <configfiles>
23 <configfile name="paramfile">
24 <![CDATA[
25 {
26 "Compress":${BinaryDataCompressionType},
27 #if $StartRetentionTime
28 "StartRetentionTime":
29 {
30 "Case" : "Some",
31 "Fields" : [
32 ${StartRetentionTime}
33 ],
34 },
35
36 #else
37 "StartRetentionTime":null,
38 #end if
39 #if $EndRetentionTime
40 "EndRetentionTime":
41 {
42 "Case" : "Some",
43 "Fields" : [
44 ${EndRetentionTime}
45 ],
46 },
47 #else
48 "EndRetentionTime":null,
49 #end if
50 "MS1PeakPicking": {
51 "Case": "${Ms1PeakPickingCond.Ms1PeakPicking}",
52 #if $Ms1PeakPickingCond.Ms1PeakPicking == "Centroid"
53 "Fields" :
54 [
55 {
56 "Case" : "${Ms1PeakPickingCond.CentroidModeCond.CentroidMode}",
57 #if $Ms1PeakPickingCond.CentroidModeCond.CentroidMode == "Wavelet"
58 "Fields" :
59 [
60 {
61 "NumberOfScales" : ${Ms1PeakPickingCond.CentroidModeCond.NumberOfScales},
62 "YThreshold" :
63 {
64 "Case" : "${Ms1PeakPickingCond.CentroidModeCond.YThresholdCond.YThreshold}",
65 #if $Ms1PeakPickingCond.CentroidModeCond.YThresholdCond.YThreshold == "Fixed"
66 "Fields":
67 [
68 ${Ms1PeakPickingCond.CentroidModeCond.YThresholdCond.Ms1YThreshold},
69 ]
70 #end if
71 },
72 "Centroid_MzTolerance" : ${Ms1PeakPickingCond.CentroidModeCond.Centroid_MzTolerance},
73 "SNRS_Percentile" : ${Ms1PeakPickingCond.CentroidModeCond.SNRS_Percentile},
74 "MinSNR" : ${Ms1PeakPickingCond.CentroidModeCond.MinSNR},
75 "RefineMZ" : ${Ms1PeakPickingCond.CentroidModeCond.RefineMZ},
76 "SumIntensities" : ${Ms1PeakPickingCond.CentroidModeCond.SumIntensities},
77 #if $Ms1PeakPickingCond.CentroidModeCond.PaddingParamsCond.usePaddingparams == "yes"
78 "PaddingParams" :
79 {
80 "Case" : "Some",
81 "Fields" :
82 [
83 {
84 #if $Ms1PeakPickingCond.CentroidModeCond.PaddingParamsCond.MaximumPaddingPointsCond.specifyMaximumPaddingPoints == "yes"
85 "MaximumPaddingPoints" : {
86 "Case" : "Some",
87 "Fields" : [
88 $Ms1PeakPickingCond.CentroidModeCond.PaddingParamsCond.MaximumPaddingPointsCond.MaximumPaddingPoints
89 ]
90 },
91 #else
92 "MaximumPaddingPoints" : null,
93 #end if
94 "Padding_MzTolerance" : $Ms1PeakPickingCond.CentroidModeCond.PaddingParamsCond.Padding_MzTolerance,
95 "WindowSize" : $Ms1PeakPickingCond.CentroidModeCond.PaddingParamsCond.WindowSize,
96 "SpacingPerc" : $Ms1PeakPickingCond.CentroidModeCond.PaddingParamsCond.SpacingPerc
97 }
98 ]
99
100 }
101 #else
102 "PaddingParams" : null
103 #end if
104 }
105
106 ]
107 #end if
108 }
109 ]
110 #end if
111 },
112 "MS2PeakPicking": {
113 "Case": "${Ms2PeakPickingCond.Ms2PeakPicking}",
114 #if $Ms2PeakPickingCond.Ms2PeakPicking == "Centroid"
115 "Fields" :
116 [
117 {
118 "Case" : "${Ms2PeakPickingCond.CentroidModeCond.CentroidMode}",
119 #if $Ms2PeakPickingCond.CentroidModeCond.CentroidMode == "Wavelet"
120 "Fields" :
121 [
122 {
123 "NumberOfScales" : ${Ms2PeakPickingCond.CentroidModeCond.NumberOfScales},
124 "YThreshold" :
125 {
126 "Case" : "${Ms2PeakPickingCond.CentroidModeCond.YThresholdCond.YThreshold}",
127 #if $Ms2PeakPickingCond.CentroidModeCond.YThresholdCond.YThreshold == "Fixed"
128 "Fields":
129 [
130 ${Ms2PeakPickingCond.CentroidModeCond.YThresholdCond.Ms2YThreshold},
131 ]
132 #end if
133 },
134 "Centroid_MzTolerance" : ${Ms2PeakPickingCond.CentroidModeCond.Centroid_MzTolerance},
135 "SNRS_Percentile" : ${Ms2PeakPickingCond.CentroidModeCond.SNRS_Percentile},
136 "MinSNR" : ${Ms2PeakPickingCond.CentroidModeCond.MinSNR},
137 "RefineMZ" : ${Ms2PeakPickingCond.CentroidModeCond.RefineMZ},
138 "SumIntensities" : ${Ms2PeakPickingCond.CentroidModeCond.SumIntensities},
139 #if $Ms2PeakPickingCond.CentroidModeCond.PaddingParamsCond.usePaddingparams == "yes"
140 "PaddingParams" :
141 {
142 "Case" : "Some",
143 "Fields" :
144 [
145 {
146 #if $Ms2PeakPickingCond.CentroidModeCond.PaddingParamsCond.MaximumPaddingPointsCond.specifyMaximumPaddingPoints == "yes"
147 "MaximumPaddingPoints" : {
148 "Case" : "Some",
149 "Fields" : [
150 $Ms2PeakPickingCond.CentroidModeCond.PaddingParamsCond.MaximumPaddingPointsCond.MaximumPaddingPoints
151 ]
152 },
153 #else
154 "MaximumPaddingPoints" : null,
155 #end if
156 "Padding_MzTolerance" : $Ms2PeakPickingCond.CentroidModeCond.PaddingParamsCond.Padding_MzTolerance,
157 "WindowSize" : $Ms2PeakPickingCond.CentroidModeCond.PaddingParamsCond.WindowSize,
158 "SpacingPerc" : $Ms2PeakPickingCond.CentroidModeCond.PaddingParamsCond.SpacingPerc
159 }
160 ]
161
162 }
163 #else
164 "PaddingParams" : null
165 #end if
166 }
167
168 ]
169 #end if
170 }
171 ]
172 #end if
173 }
174 }
175 ]]>
176 </configfile>
177 </configfiles>
178 <inputs>
179 <param name="instrumentOutput" type="data" format="mzml" label="Instrument output" help="Please specify the .mzML file you want to convert"/>
180 <param name="BinaryDataCompressionType" type="select" label="Binary data compression type">
181 <option value="0" selected="true">No compression</option>
182 <option value="1">ZLib</option>
183 <option value="2">Num press</option>
184 <option value="3">Num press ZLib</option>
185 <option value="4">Num press Pic</option>
186 <option value="5">Num press Lin</option>
187 </param>
188 <param name="StartRetentionTime" type="float" optional="true" label="Start retention time" help="You can optionally specify a minimum scan time. MS scans measured earlier will not be copied."/>
189 <param name="EndRetentionTime" type="float" optional="true" label="End retention time" help="You can optionally specify a maximum scan time. MS scans measured at a later scan time will not be copied."/>
190 <conditional name="Ms1PeakPickingCond">
191 <param name="Ms1PeakPicking" type="select" label="MS1 peak picking">
192 <option value="ProfilePeaks" selected="true">Profile peaks</option>
193 <option value="Centroid">Centroid</option>
194 </param>
195 <when value="Centroid">
196 <conditional name="CentroidModeCond">
197 <param name="CentroidMode" type="select" label="Centroidization mode">
198 <option value="Manufacturer">Manufacturer</option>
199 <option value="Wavelet">Wavelet</option>
200 </param>
201 <when value="Wavelet">
202 <param name="NumberOfScales" type="integer" value="0" label="Number of scales"/>
203 <conditional name="YThresholdCond">
204 <param name="YThreshold" type="select" label="Y threshold">
205 <option value="Fixed" selected="true">Fixed</option>
206 <option value="MinSpectrumIntensity">Min spectrum intensity</option>
207 </param>
208 <when value="Fixed">
209 <param name="Ms1YThreshold" type="float" value="0" label="Value"/>
210 </when>
211 </conditional>
212 <param name="Centroid_MzTolerance" type="float" value="0" label="Centroid MZ tolerance"/>
213 <param name="SNRS_Percentile" type="float" value="0" label="SNRS percentile"/>
214 <param name="MinSNR" type="float" value="0" label="Min SNR"/>
215 <param name="RefineMZ" type="boolean" value="false" label="Refine MZ"/>
216 <param name="SumIntensities" type="boolean" value="false" label="Sum intensities"/>
217 <conditional name="PaddingParamsCond">
218 <param name="usePaddingparams" type="select" checked="false" label="Specify padding parameters">
219 <option value="yes">Yes</option>
220 <option value="no">No</option>
221 </param>
222 <when value="yes">
223 <conditional name="MaximumPaddingPointsCond">
224 <param name="specifyMaximumPaddingPoints" type="select" label="Speficy maximum padding points">
225 <option value="yes">Yes</option>
226 <option value="no">No</option>
227 </param>
228 <when value="yes">
229 <param name="MaximumPaddingPoints" type="integer" value="0" label="Maximum padding points"/>
230 </when>
231 </conditional>
232 <param name="Padding_MzTolerance" type="float" value="0" label="Padding MZ tolerance"/>
233 <param name="WindowSize" type="integer" value="0" label="Window size"/>
234 <param name="SpacingPerc" type="float" value="0" label="Spacing perc"/>
235 </when>
236 </conditional>
237 </when>
238 </conditional>
239 </when>
240 </conditional>
241 <conditional name="Ms2PeakPickingCond">
242 <param name="Ms2PeakPicking" type="select" label="MS2 peak picking">
243 <option value="ProfilePeaks" selected="true">Profile peaks</option>
244 <option value="Centroid">Centroid</option>
245 </param>
246 <when value="Centroid">
247 <conditional name="CentroidModeCond">
248 <param name="CentroidMode" type="select" label="Centroidization mode">
249 <option value="Manufacturer">Manufacturer</option>
250 <option value="Wavelet">Wavelet</option>
251 </param>
252 <when value="Wavelet">
253 <param name="NumberOfScales" type="integer" value="0" label="Number of scales"/>
254 <conditional name="YThresholdCond">
255 <param name="YThreshold" type="select" label="Y threshold">
256 <option value="Fixed" selected="true">Fixed</option>
257 <option value="MinSpectrumIntensity">Min spectrum intensity</option>
258 </param>
259 <when value="Fixed">
260 <param name="Ms2YThreshold" type="float" value="0" label="Value"/>
261 </when>
262 </conditional>
263 <param name="Centroid_MzTolerance" type="float" value="0" label="Centroid MZ tolerance"/>
264 <param name="SNRS_Percentile" type="float" value="0" label="SNRS percentile"/>
265 <param name="MinSNR" type="float" value="0" label="Min SNR"/>
266 <param name="RefineMZ" type="boolean" value="false" label="Refine MZ"/>
267 <param name="SumIntensities" type="boolean" value="false" label="Sum intensities"/>
268 <conditional name="PaddingParamsCond">
269 <param name="usePaddingparams" type="select" label="Specify padding parameters">
270 <option value="yes">Yes</option>
271 <option value="no">No</option>
272 </param>
273 <when value="yes">
274 <conditional name="MaximumPaddingPointsCond">
275 <param name="specifyMaximumPaddingPoints" type="select" label="Speficy maximum padding points">
276 <option value="yes">Yes</option>
277 <option value="no">No</option>
278 </param>
279 <when value="yes">
280 <param name="MaximumPaddingPoints" type="integer" value="0" label="Maximum padding points"/>
281 </when>
282 </conditional>
283 <param name="Padding_MzTolerance" type="float" value="0" label="Padding MZ tolerance"/>
284 <param name="WindowSize" type="integer" value="0" label="Window size"/>
285 <param name="SpacingPerc" type="float" value="0" label="Spacing perc"/>
286 </when>
287 </conditional>
288 </when>
289 </conditional>
290 </when>
291 </conditional>
292 <param name="outputParamfile" type="boolean" value="false" label="Output parameter file"/>
293 </inputs>
294 <outputs>
295 <data format="sqlite" name="out_mzlite" />
296 <data format="json" name="out_paramfile">
297 <filter>outputParamfile</filter>
298 </data>
299 </outputs>
300 <tests>
301 <test expect_num_outputs="2">
302 <param name="instrumentOutput" value="sample.mzml"/>
303 <param name="BinaryDataCompressionType" value="0"/>
304 <param name="StartRetentionTime" value=""/>
305 <param name="EndRetentionTime" value=""/>
306 <conditional name="Ms1PeakPickingCond">
307 <param name="Ms1PeakPicking" value="ProfilePeaks"/>
308 </conditional>
309 <conditional name="Ms2PeakPickingCond">
310 <param name="Ms2PeakPicking" value="ProfilePeaks"/>
311 </conditional>
312 <param name="outputParamfile" value="true"/>
313 <output name="out_paramfile" file="result_1.json"/>
314 </test>
315 <test expect_num_outputs="2">
316 <param name="instrumentOutput" value="sample.mzml"/>
317 <param name="BinaryDataCompressionType" value="0"/>
318 <param name="StartRetentionTime" value=""/>
319 <param name="EndRetentionTime" value=""/>
320 <conditional name="Ms1PeakPickingCond">
321 <param name="Ms1PeakPicking" value="Centroid"/>
322 <conditional name="CentroidModeCond">
323 <param name="CentroidMode" value="Wavelet"/>
324 <param name="NumberOfScales" value="3"/>
325 <conditional name="YThresholdCond">
326 <param name="YThreshold" value="Fixed"/>
327 <param name="Ms1YThreshold" value="1"/>
328 </conditional>
329 <param name="Centroid_MzTolerance" value="0.1"/>
330 <param name="SNRS_Percentile" value="95.0"/>
331 <param name="MinSNR" value="1.0"/>
332 <param name="RefineMZ" value="false"/>
333 <param name="SumIntensities" value="false"/>
334 <conditional name="PaddingParamsCond">
335 <param name="usePaddingparams" value="no"/>
336 </conditional>
337 </conditional>
338 </conditional>
339 <conditional name="Ms2PeakPickingCond">
340 <param name="Ms2PeakPicking" value="ProfilePeaks"/>
341 </conditional>
342 <param name="outputParamfile" value="true"/>
343 <output name="out_paramfile" file="result_2.json"/>
344 </test>
345 <test expect_num_outputs="2">
346 <param name="instrumentOutput" value="sample.mzml"/>
347 <param name="BinaryDataCompressionType" value="0"/>
348 <param name="StartRetentionTime" value=""/>
349 <param name="EndRetentionTime" value=""/>
350 <conditional name="Ms1PeakPickingCond">
351 <param name="Ms1PeakPicking" value="ProfilePeaks"/>
352 </conditional>
353 <conditional name="Ms2PeakPickingCond">
354 <param name="Ms2PeakPicking" value="Centroid"/>
355 <conditional name="CentroidModeCond">
356 <param name="CentroidMode" value="Wavelet"/>
357 <param name="NumberOfScales" value="10"/>
358 <conditional name="YThresholdCond">
359 <param name="YThreshold" value="MinSpectrumIntensity"/>
360 </conditional>
361 <param name="Centroid_MzTolerance" value="0.1"/>
362 <param name="SNRS_Percentile" value="95.0"/>
363 <param name="MinSNR" value="1.0"/>
364 <param name="RefineMZ" value="false"/>
365 <param name="SumIntensities" value="false"/>
366 <conditional name="PaddingParamsCond">
367 <param name="usePaddingparams" value="yes"/>
368 <conditional name="MaximumPaddingPointsCond">
369 <param name="specifyMaximumPaddingPoints" value="yes" />
370 <param name="MaximumPaddingPoints" value="7" />
371 </conditional>
372 <param name="Padding_MzTolerance" value="0.005" />
373 <param name="WindowSize" value="150"/>
374 <param name="SpacingPerc" value="95"/>
375 </conditional>
376 </conditional>
377 </conditional>
378 <param name="outputParamfile" value="true"/>
379 <output name="out_paramfile" file="result_3.json"/>
380 </test>
381 <test expect_num_outputs="2">
382 <param name="instrumentOutput" value="sample.mzml"/>
383 <param name="BinaryDataCompressionType" value="0"/>
384 <param name="StartRetentionTime" value="6.75"/>
385 <param name="EndRetentionTime" value="6.75"/>
386 <conditional name="Ms1PeakPickingCond">
387 <param name="Ms1PeakPicking" value="ProfilePeaks"/>
388 </conditional>
389 <conditional name="Ms2PeakPickingCond">
390 <param name="Ms2PeakPicking" value="ProfilePeaks"/>
391 </conditional>
392 <param name="outputParamfile" value="true"/>
393 <output name="out_paramfile" file="result_4.json"/>
394 </test>
395 <test expect_num_outputs="1">
396 <param name="instrumentOutput" value="sample.mzml"/>
397 <param name="BinaryDataCompressionType" value="0"/>
398 <param name="StartRetentionTime" value="6.75"/>
399 <param name="EndRetentionTime" value="6.75"/>
400 <conditional name="Ms1PeakPickingCond">
401 <param name="Ms1PeakPicking" value="ProfilePeaks"/>
402 </conditional>
403 <conditional name="Ms2PeakPickingCond">
404 <param name="Ms2PeakPicking" value="ProfilePeaks"/>
405 </conditional>
406 </test>
407 </tests>
408 <help>
409 <![CDATA[
410 Introduction
411 ------------
412 The success of modern proteomics was made possible by constant progression in the field of mass spectrometry.
413 Over the course of the past years quite a few manufacturers of mass spectrometers have managed to establish themselfes in the field of biological research.
414 Since aquisition and accession of mass spectra are performance critical processes, various performance optimized, but vendor specific and closed source formats have been developed to store raw MS data.
415 This comes to the disadvantage for toolchain developers which want to provide tools for every scientist regardless of the format of their raw data.
416
417 In a effort to provide an open format for the storage of MS data the format mzML was developed. While this XML based format is straight forward to implement it falls behind in performance critical scenarios.
418 To be competitive in performance and to comply to the FAIR principles we chose to use mzLite, an open and SQLite based implementation of mzML, within our toolchain.
419
420 What It Does
421 ------------
422 The tool mzMLToMzLite allows to convert mzML files to mzLite files. Additionally, it allows the user to perform peak picking or filtering of mass spectra.
423 We recommend the use of `_msconvert <https://usegalaxy.eu/root?tool_id=toolshed.g2.bx.psu.edu/repos/galaxyp/msconvert/msconvert/3.0.20287.2>`_ to convert your raw data into .mzML.
424
425 Further Reading
426 ---------------
427 Additional information about the tool can be found in the `_documentation <https://csbiology.github.io/ProteomIQon/tools/MzMLToMzLite.html>`_.
428 ]]>
429 </help>
430 </tool>