comparison xcms_plot_raw.xml @ 0:520448a32548 draft default tip

planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics/ commit eca29d4347fe2f4802091c4a06715232a6fd9253
author workflow4metabolomics
date Mon, 15 Jul 2024 16:03:26 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:520448a32548
1 <tool id="xcms_plot_raw" name="xcms plot raw" version="@TOOL_VERSION@+galaxy0" profile="21.09">
2 <description>Plot raw data filtered by m/z range and retention time (RT) range</description>
3 <macros>
4 <import>macros_xcms_plot.xml</import>
5 </macros>
6 <expand macro="bio.tools"/>
7 <expand macro="creator"/>
8 <requirements>
9 <requirement type="package" version="@TOOL_VERSION@">bioconductor-xcms</requirement>
10 </requirements>
11 <command detect_errors="exit_code"><![CDATA[
12 Rscript -e 'source("${plot_raw}")'
13 ]]></command>
14 <configfiles>
15 <configfile name="plot_raw">
16 library(xcms)
17 library(MsExperiment)
18 library(Spectra)
19 mse = readMsExperiment(file.path('${input}'))
20 mz_offset = ${tolerance_ppm} * 1e-6 * ${mz_value}
21 rt_offset = ${rt_range} / 2
22 raw = mse |>
23 filterRt(rt = ${rt} + c(-rt_offset, rt_offset)) |>
24 filterMzRange(mz = ${mz_value} + c(-mz_offset, mz_offset))
25 png(filename = '${output_filename}')
26 par(oma = c(0.5, 2, 0.5, 1))
27 plot(raw)
28 dev.off()
29 </configfile>
30 </configfiles>
31 <inputs>
32 <expand macro="base_params"/>
33 <param type="float" name="rt" label="Retention Time" min="0.0" value="0.0" help="Retention time for the plot"/>
34 <param type="float" name="rt_range" value="5.0" min="0.0" label="Retention Time Range" help="Retention time range for the plot"/>
35 </inputs>
36 <outputs>
37 <data name="output_filename" format="png" label="PLot at m/z=$mz_value and rt=$rt of $input.element_identifier"/>
38 </outputs>
39 <tests>
40 <test>
41 <param name="input" value="xcms_plot_raw_testdata.mzML"/>
42 <param name="mz_value" value="153.06583"/>
43 <param name="tolerance_ppm" value="10"/>
44 <param name="rt" value="171.922"/>
45 <param name="rt_range" value="0.1"/>
46 <output name="output_filename" file="raw_plot.png" compare="sim_size" delta="5000"/>
47 </test>
48 </tests>
49 <help><![CDATA[
50 This tool plots the raw data filtered by m/z range and retention time (RT) range from an mzML file.
51 It uses a default tolerance of 10 ppm and retention time range of 5 s.
52 More information and detailed instructions can be found in the tutorial at: https://jorainer.github.io/xcmsTutorials/articles/xcms-preprocessing.html#data-visualization
53 ]]></help>
54 <expand macro="citations"/>
55 </tool>