Mercurial > repos > workflow4metabolomics > xcms_plot_raw
comparison xcms_plot_raw.xml @ 1:8b8d360316c3 draft default tip
planemo upload for repository https://github.com/workflow4metabolomics/tools-metabolomics/ commit bb7574b871cff739f7abbda62a5269ec1f98971f
author | workflow4metabolomics |
---|---|
date | Thu, 15 May 2025 17:02:56 +0000 |
parents | 520448a32548 |
children |
comparison
equal
deleted
inserted
replaced
0:520448a32548 | 1:8b8d360316c3 |
---|---|
14 <configfiles> | 14 <configfiles> |
15 <configfile name="plot_raw"> | 15 <configfile name="plot_raw"> |
16 library(xcms) | 16 library(xcms) |
17 library(MsExperiment) | 17 library(MsExperiment) |
18 library(Spectra) | 18 library(Spectra) |
19 | |
20 sessionInfo() | |
21 | |
19 mse = readMsExperiment(file.path('${input}')) | 22 mse = readMsExperiment(file.path('${input}')) |
20 mz_offset = ${tolerance_ppm} * 1e-6 * ${mz_value} | 23 mz_offset = ${tolerance_ppm} * 1e-6 * ${mz_value} |
21 rt_offset = ${rt_range} / 2 | 24 rt_offset = ${rt_range} |
25 | |
22 raw = mse |> | 26 raw = mse |> |
27 filterMsLevel(msLevel = ${mslevel}L) |> | |
23 filterRt(rt = ${rt} + c(-rt_offset, rt_offset)) |> | 28 filterRt(rt = ${rt} + c(-rt_offset, rt_offset)) |> |
24 filterMzRange(mz = ${mz_value} + c(-mz_offset, mz_offset)) | 29 filterMzRange(mz = ${mz_value} + c(-mz_offset, mz_offset)) |
25 png(filename = '${output_filename}') | 30 png(filename = '${output_filename}') |
26 par(oma = c(0.5, 2, 0.5, 1)) | 31 par(oma = c(0.5, 2, 0.5, 1)) |
27 plot(raw) | 32 plot(raw) |
29 </configfile> | 34 </configfile> |
30 </configfiles> | 35 </configfiles> |
31 <inputs> | 36 <inputs> |
32 <expand macro="base_params"/> | 37 <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"/> | 38 <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"/> | 39 <param type="float" name="rt_range" value="5.0" min="0.0" label="Retention Time Range" help="Retention time range for the plot. Range is applied on both sides of the specified RT value (+-)."/> |
35 </inputs> | 40 </inputs> |
36 <outputs> | 41 <outputs> |
37 <data name="output_filename" format="png" label="PLot at m/z=$mz_value and rt=$rt of $input.element_identifier"/> | 42 <data name="output_filename" format="png" label="Plot at m/z=$mz_value and rt=$rt of $input.element_identifier"/> |
38 </outputs> | 43 </outputs> |
39 <tests> | 44 <tests> |
40 <test> | 45 <test> |
41 <param name="input" value="xcms_plot_raw_testdata.mzML"/> | 46 <param name="input" value="xcms_plot_raw_testdata.mzML"/> |
42 <param name="mz_value" value="153.06583"/> | 47 <param name="mz_value" value="153.06583"/> |
43 <param name="tolerance_ppm" value="10"/> | 48 <param name="tolerance_ppm" value="10"/> |
44 <param name="rt" value="171.922"/> | 49 <param name="rt" value="171.922"/> |
45 <param name="rt_range" value="0.1"/> | 50 <param name="rt_range" value="5"/> |
46 <output name="output_filename" file="raw_plot.png" compare="sim_size" delta="5000"/> | 51 <output name="output_filename"> |
52 <assert_contents> | |
53 <has_image_channels channels="3"/> | |
54 <has_image_center_of_mass center_of_mass="240.30, 240.51" eps="0.1"/> | |
55 </assert_contents> | |
56 </output> | |
47 </test> | 57 </test> |
48 </tests> | 58 </tests> |
49 <help><![CDATA[ | 59 <help><![CDATA[ |
50 This tool plots the raw data filtered by m/z range and retention time (RT) range from an mzML file. | 60 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. | 61 It uses a default tolerance of 10 ppm and retention time range of 5 s. |