Mercurial > repos > workflow4metabolomics > xcms_plot_raw
changeset 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 (16 hours ago) |
parents | 520448a32548 |
children | |
files | macros_xcms_plot.xml xcms_plot_raw.xml |
diffstat | 2 files changed, 19 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/macros_xcms_plot.xml Mon Jul 15 16:03:26 2024 +0000 +++ b/macros_xcms_plot.xml Thu May 15 17:02:56 2025 +0000 @@ -1,5 +1,5 @@ <macros> - <token name="@TOOL_VERSION@">4.0.0</token> + <token name="@TOOL_VERSION@">4.4.0</token> <xml name="creator"> <creator> <person @@ -24,9 +24,10 @@ </xrefs> </xml> <xml name="base_params"> - <param type="data" name="input" format="mzML" label="Input mzML file"/> + <param type="data" name="input" format="mzml" label="Input mzML file"/> <param type="float" name="mz_value" value="10.0" min="0.0" label="m/z Value" help="m/z value for the EIC"/> - <param type="integer" value="10" name="tolerance_ppm" min="0" label="Tolerance (ppm)" help="Tolerance for m/z value in ppm"/> + <param type="integer" value="10" name="tolerance_ppm" min="0" label="Tolerance (ppm)" help="Tolerance for m/z value in ppm. Tolerance is applied on both sides (+-)."/> + <param type="integer" value="1" name="mslevel" min="1" label="MS Level" help="MS level for the EIC"/> </xml> <xml name="citations"> <citations>
--- a/xcms_plot_raw.xml Mon Jul 15 16:03:26 2024 +0000 +++ b/xcms_plot_raw.xml Thu May 15 17:02:56 2025 +0000 @@ -16,10 +16,15 @@ library(xcms) library(MsExperiment) library(Spectra) + +sessionInfo() + mse = readMsExperiment(file.path('${input}')) mz_offset = ${tolerance_ppm} * 1e-6 * ${mz_value} -rt_offset = ${rt_range} / 2 +rt_offset = ${rt_range} + raw = mse |> + filterMsLevel(msLevel = ${mslevel}L) |> filterRt(rt = ${rt} + c(-rt_offset, rt_offset)) |> filterMzRange(mz = ${mz_value} + c(-mz_offset, mz_offset)) png(filename = '${output_filename}') @@ -31,10 +36,10 @@ <inputs> <expand macro="base_params"/> <param type="float" name="rt" label="Retention Time" min="0.0" value="0.0" help="Retention time for the plot"/> - <param type="float" name="rt_range" value="5.0" min="0.0" label="Retention Time Range" help="Retention time range for the plot"/> + <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 (+-)."/> </inputs> <outputs> - <data name="output_filename" format="png" label="PLot at m/z=$mz_value and rt=$rt of $input.element_identifier"/> + <data name="output_filename" format="png" label="Plot at m/z=$mz_value and rt=$rt of $input.element_identifier"/> </outputs> <tests> <test> @@ -42,8 +47,13 @@ <param name="mz_value" value="153.06583"/> <param name="tolerance_ppm" value="10"/> <param name="rt" value="171.922"/> - <param name="rt_range" value="0.1"/> - <output name="output_filename" file="raw_plot.png" compare="sim_size" delta="5000"/> + <param name="rt_range" value="5"/> + <output name="output_filename"> + <assert_contents> + <has_image_channels channels="3"/> + <has_image_center_of_mass center_of_mass="240.30, 240.51" eps="0.1"/> + </assert_contents> + </output> </test> </tests> <help><![CDATA[