comparison bioconductor_msnbase_smooth_chromatogram.xml @ 0:492350f45be9 draft default tip

planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/bioconductor-msnbase commit 8a94b9932a94c323a33dfe858ee0a2c57fb04701
author recetox
date Fri, 24 Jan 2025 15:58:26 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:492350f45be9
1 <tool id="bioconductor_msnbase_smooth_chromatogram" name="bioconductor-msnbase smooth chromatogram" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT">
2 <description>smooth consecutive spectra using a moving window filter (combineSpectraMovingWindow)</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <edam_topics>
7 <edam_topic>topic_3170</edam_topic> <!-- Proteomics -->
8 <edam_topic>topic_3391</edam_topic> <!-- Data handling -->
9 </edam_topics>
10 <edam_operations>
11 <edam_operation>operation_3632</edam_operation> <!-- Data smoothing -->
12 <edam_operation>operation_2945</edam_operation> <!-- Data handling -->
13 </edam_operations>
14
15 <expand macro="xrefs"/>
16 <expand macro="creator"/>
17 <expand macro="requirements"/>
18
19 <command detect_errors="exit_code"><![CDATA[
20 Rscript "${run_script}"
21 ]]></command>
22 <configfiles>
23 <configfile name="run_script"><![CDATA[
24 data_prof <- MSnbase::readMSData("$input_file", mode = "onDisk")
25 data_smoothed <- MSnbase::combineSpectraMovingWindow(
26 data_prof,
27 halfWindowSize = ${halfWindowSize},
28 intensityFun = ${intensity_function},
29 mzd = 0,
30 timeDomain = $qtof,
31 weighted = $weighted,
32 ppm = $ppm,
33 BPPARAM = BiocParallel::bpparam()
34 )
35 MSnbase::writeMSData(
36 data_smoothed,
37 file = "smoothed.mzml",
38 copy = TRUE,
39 outformat = "mzml"
40 )
41 ]]></configfile>
42 </configfiles>
43 <inputs>
44 <param name="input_file" type="data" format="mzml" label="Input mzML File" help="The input mzML file containing the MSnbase data."/>
45 <param name="halfWindowSize" type="integer" label="Half window size" min="2" value="4"
46 help="The half window size for the moving window smoothing method. This determines the number of data points on either side of the center point to include in the smoothing calculation."/>
47 <param name="weighted" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Weighted"
48 help="Specify whether to apply a weighted moving average, where the weights depend on the distance from the center of the window." />
49 <param name="qtof" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="QTOF"
50 help="Indicate if the data was acquired using a QTOF (Quadrupole Time-of-Flight) instrument, which affects the time domain processing." />
51 <param argument="--ppm" type="integer" min="0" value="3" label="ppm tolerance"
52 help="The parts-per-million (ppm) tolerance for considering mz values as belonging to the same ion. A higher value allows for more variation in mz values." />
53 <param name="intensity_function" type="select" label="Function to combine intensities"
54 help="Choose the function to combine the intensity values of the same m/z value within the moving window. Options include mean, median, min, max, and sum.">
55 <option value="base::mean" selected="true">mean</option>
56 <option value="stats::median">median</option>
57 <option value="min">min</option>
58 <option value="max">max</option>
59 <option value="sum">sum</option>
60 </param>
61 </inputs>
62 <outputs>
63 <data name="output_file" format="mzml" label="Chromatogram smoothing on ${on_string}" from_work_dir="smoothed.mzml"/>
64 </outputs>
65 <tests>
66 <test>
67 <param name="input_file" value="29_qc_no_dil_milliq_subset.mzML"/>
68 <output name="output_file">
69 <assert_contents>
70 <expand macro="assertions_smoothing"/>
71 <has_size size="173532" delta="100"/>
72 </assert_contents>
73 </output>
74 </test>
75 </tests>
76 <help><![CDATA[
77
78 .. class:: infomark
79
80 **What it does**
81
82 This tool performs chromatogram smoothing on mass spectrometry data using the MSnbase package in R. It applies a moving window smoothing method to the input mzML file, which helps in reducing noise and improving the signal quality.
83
84 **Usage**
85
86 - **Input**: Provide the input mzML file containing the mass spectrometry data to be smoothed.
87 - **Parameters**:
88 - **Half window size**: The number of data points on either side of the center point to include in the smoothing calculation.
89 - **Weighted**: Whether to apply a weighted moving average.
90 - **QTOF**: Indicate if the data was acquired using a QTOF instrument.
91 - **ppm tolerance**: The parts-per-million tolerance for considering mz values as belonging to the same ion.
92 - **Function to combine intensities**: Choose the function to combine the intensity values within the moving window.
93 - **Output**: The smoothed mzML file.
94
95 **Input**
96
97 - **Input mzML File**: The input mzML file containing the MSnbase data to be smoothed.
98
99 **Output**
100
101 - **Output mzML File**: The resulting mzML file after applying the smoothing algorithm.
102
103 ]]></help>
104 <expand macro="citations"/>
105 </tool>