Commit message:
planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/bioconductor-msnbase commit 8a94b9932a94c323a33dfe858ee0a2c57fb04701 |
added:
bioconductor_msnbase_smooth_chromatogram.xml macros.xml test-data/29_qc_no_dil_milliq_subset.mzML |
b |
diff -r 000000000000 -r 492350f45be9 bioconductor_msnbase_smooth_chromatogram.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bioconductor_msnbase_smooth_chromatogram.xml Fri Jan 24 15:58:26 2025 +0000 |
[ |
@@ -0,0 +1,105 @@ +<tool id="bioconductor_msnbase_smooth_chromatogram" name="bioconductor-msnbase smooth chromatogram" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01" license="MIT"> + <description>smooth consecutive spectra using a moving window filter (combineSpectraMovingWindow)</description> + <macros> + <import>macros.xml</import> + </macros> + <edam_topics> + <edam_topic>topic_3170</edam_topic> <!-- Proteomics --> + <edam_topic>topic_3391</edam_topic> <!-- Data handling --> + </edam_topics> + <edam_operations> + <edam_operation>operation_3632</edam_operation> <!-- Data smoothing --> + <edam_operation>operation_2945</edam_operation> <!-- Data handling --> + </edam_operations> + + <expand macro="xrefs"/> + <expand macro="creator"/> + <expand macro="requirements"/> + + <command detect_errors="exit_code"><![CDATA[ + Rscript "${run_script}" + ]]></command> + <configfiles> + <configfile name="run_script"><![CDATA[ + data_prof <- MSnbase::readMSData("$input_file", mode = "onDisk") + data_smoothed <- MSnbase::combineSpectraMovingWindow( + data_prof, + halfWindowSize = ${halfWindowSize}, + intensityFun = ${intensity_function}, + mzd = 0, + timeDomain = $qtof, + weighted = $weighted, + ppm = $ppm, + BPPARAM = BiocParallel::bpparam() + ) + MSnbase::writeMSData( + data_smoothed, + file = "smoothed.mzml", + copy = TRUE, + outformat = "mzml" + ) + ]]></configfile> + </configfiles> + <inputs> + <param name="input_file" type="data" format="mzml" label="Input mzML File" help="The input mzML file containing the MSnbase data."/> + <param name="halfWindowSize" type="integer" label="Half window size" min="2" value="4" + 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."/> + <param name="weighted" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Weighted" + help="Specify whether to apply a weighted moving average, where the weights depend on the distance from the center of the window." /> + <param name="qtof" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="QTOF" + help="Indicate if the data was acquired using a QTOF (Quadrupole Time-of-Flight) instrument, which affects the time domain processing." /> + <param argument="--ppm" type="integer" min="0" value="3" label="ppm tolerance" + 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." /> + <param name="intensity_function" type="select" label="Function to combine intensities" + 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."> + <option value="base::mean" selected="true">mean</option> + <option value="stats::median">median</option> + <option value="min">min</option> + <option value="max">max</option> + <option value="sum">sum</option> + </param> + </inputs> + <outputs> + <data name="output_file" format="mzml" label="Chromatogram smoothing on ${on_string}" from_work_dir="smoothed.mzml"/> + </outputs> + <tests> + <test> + <param name="input_file" value="29_qc_no_dil_milliq_subset.mzML"/> + <output name="output_file"> + <assert_contents> + <expand macro="assertions_smoothing"/> + <has_size size="173532" delta="100"/> + </assert_contents> + </output> + </test> + </tests> + <help><![CDATA[ + +.. class:: infomark + +**What it does** + +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. + +**Usage** + +- **Input**: Provide the input mzML file containing the mass spectrometry data to be smoothed. +- **Parameters**: + - **Half window size**: The number of data points on either side of the center point to include in the smoothing calculation. + - **Weighted**: Whether to apply a weighted moving average. + - **QTOF**: Indicate if the data was acquired using a QTOF instrument. + - **ppm tolerance**: The parts-per-million tolerance for considering mz values as belonging to the same ion. + - **Function to combine intensities**: Choose the function to combine the intensity values within the moving window. +- **Output**: The smoothed mzML file. + +**Input** + +- **Input mzML File**: The input mzML file containing the MSnbase data to be smoothed. + +**Output** + +- **Output mzML File**: The resulting mzML file after applying the smoothing algorithm. + + ]]></help> + <expand macro="citations"/> +</tool> \ No newline at end of file |
b |
diff -r 000000000000 -r 492350f45be9 macros.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Fri Jan 24 15:58:26 2025 +0000 |
b |
@@ -0,0 +1,46 @@ +<macros> + <xml name="creator"> + <creator> + <person + givenName="Helge" + familyName="Hecht" + url="https://github.com/hechth" + identifier="0000-0001-6744-996X" /> + <organization + url="https://www.recetox.muni.cz/" + email="GalaxyToolsDevelopmentandDeployment@space.muni.cz" + name="RECETOX MUNI" /> + </creator> + </xml> + + <xml name="xrefs"> + <xrefs> + <xref type="bio.tools">msnbase</xref> + <xref type="bioconductor">msnbase</xref> + </xrefs> + </xml> + + <token name="@TOOL_VERSION@">2.32.0</token> + <token name="@VERSION_SUFFIX@">0</token> + <xml name="requirements"> + <requirements> + <requirement type="package" version="@TOOL_VERSION@">bioconductor-msnbase</requirement> + </requirements> + </xml> + <xml name="citations"> + <citations> + <citation type="doi">10.18129/B9.bioc.MSnbase</citation> + </citations> + </xml> + <xml name="assertions_smoothing"> + <has_text text='id="sf_ru_0"'/> + <has_text text="f3fdaed6b23f3690e004d16921be328018771bf1"/> + <has_n_lines n="1775"/> + </xml> + + <xml name="assertions_centroiding"> + <has_n_lines n="1512"/> + <has_text text='accession="MS:1000035" name="peak picking"'/> + <has_size size="129630" delta="50"/> + </xml> +</macros> \ No newline at end of file |
b |
diff -r 000000000000 -r 492350f45be9 test-data/29_qc_no_dil_milliq_subset.mzML --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/29_qc_no_dil_milliq_subset.mzML Fri Jan 24 15:58:26 2025 +0000 |
[ |
b'@@ -0,0 +1,1844 @@\n+<?xml version="1.0" encoding="ISO-8859-1"?>\n+<indexedmzML xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd">\n+<mzML xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0.xsd" accession="" version="1.1.0">\n+\t<cvList count="5">\n+\t\t<cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" URI="http://psidev.cvs.sourceforge.net/*checkout*/psidev/psi/psi-ms/mzML/controlledVocabulary/psi-ms.obo"/>\n+\t\t<cv id="UO" fullName="Unit Ontology" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo"/>\n+\t\t<cv id="BTO" fullName="BrendaTissue545" version="unknown" URI="http://www.brenda-enzymes.info/ontology/tissue/tree/update/update_files/BrendaTissueOBO"/>\n+\t\t<cv id="GO" fullName="Gene Ontology - Slim Versions" version="unknown" URI="http://www.geneontology.org/GO_slims/goslim_goa.obo"/>\n+\t\t<cv id="PATO" fullName="Quality ontology" version="unknown" URI="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/phenotype/quality.obo"/>\n+\t</cvList>\n+\t<fileDescription>\n+\t\t<fileContent>\n+\t\t\t<cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" />\n+\t\t</fileContent>\n+\t\t<sourceFileList count="1">\n+\t\t\t<sourceFile id="sf_ru_0" name="Galaxy1-[29_qc_no_dil_milliq.mzml].mzml" location="file:///C:/Users/473355/Downloads">\n+\t\t\t\t<cvParam cvRef="MS" accession="MS:1000569" name="SHA-1" value="f3fdaed6b23f3690e004d16921be328018771bf1" />\n+\t\t\t\t<cvParam cvRef="MS" accession="MS:1000584" name="mzML format" />\n+\t\t\t\t<cvParam cvRef="MS" accession="MS:1000768" name="Thermo nativeID format" />\n+\t\t\t</sourceFile>\n+\t\t</sourceFileList>\n+\t</fileDescription>\n+\t<sampleList count="1">\n+\t\t<sample id="sa_0" name="">\n+\t\t\t<cvParam cvRef="MS" accession="MS:1000004" name="sample mass" value="0" unitAccession="UO:0000021" unitName="gram" unitCvRef="UO" />\n+\t\t\t<cvParam cvRef="MS" accession="MS:1000005" name="sample volume" value="0" unitAccession="UO:0000098" unitName="milliliter" unitCvRef="UO" />\n+\t\t\t<cvParam cvRef="MS" accession="MS:1000006" name="sample concentration" value="0" unitAccession="UO:0000175" unitName="gram per liter" unitCvRef="UO" />\n+\t\t</sample>\n+\t</sampleList>\n+\t<softwareList count="3">\n+\t\t<software id="so_in_0" version="" >\n+\t\t\t<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />\n+\t\t</software>\n+\t\t<software id="so_default" version="" >\n+\t\t\t<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />\n+\t\t</software>\n+\t\t<software id="so_dp_sp_0_pm_0" version="1.3.4" >\n+\t\t\t<cvParam cvRef="MS" accession="MS:1003145" name="ThermoRawFileParser" />\n+\t\t</software>\n+\t</softwareList>\n+\t<instrumentConfigurationList count="1">\n+\t\t<instrumentConfiguration id="ic_0">\n+\t\t\t<cvParam cvRef="MS" accession="MS:1001911" name="Q Exactive" />\n+\t\t\t<cvParam cvRef="MS" accession="MS:1000529" name="instrument serial number" value="RECETOX Brno"/>\n+\t\t\t<componentList count="3">\n+\t\t\t\t<source order="1">\n+\t\t\t\t\t<cvParam cvRef="MS" accession="MS:1000008" name="ionization type" />\n+\t\t\t\t</source>\n+\t\t\t\t<analyzer order="2">\n+\t\t\t\t\t<cvParam cvRef="MS" accession="MS:1000014" name="accuracy" value="0" unitAccession="UO:0000169" unitName="parts per million" unitCvRef="UO" />\n+\t\t\t\t\t<cvParam cvRef="MS" accession="MS:1000022" name="TOF Total Path Length" value="0" unitAccession="UO:0000008" unitName="meter" unitCvRef="UO" />\n+\t\t\t\t\t<cvParam cvRef="MS" accession="MS:1000024" name="final MS exponent" value="0" />\n+\t\t\t\t\t<cvParam cvRef="MS" accession="MS:1000025" name="magnetic field strength" value="0" unitAccession="UO:0000228" unitName="tesla" unitCvRef="UO" />\n+\t\t\t\t\t<cvParam cvRef="MS" accession="MS:1000079" name="fourier transform ion cyclotron resonance mass spectrometer" />\n+\t\t\t\t</analyzer>\n+'..b'JIzgIOSK77Pkdcl05GcumWRUWuAEZzI2FGu+F5RgcPPEaCsbpFMd18RWTKhEZwLoBHGmgASGwdQ0jZUDpICxDqRz2qU0dbuFJGkFlSRRQtd0UoIyRGSb+QRuRTskatk55GkiZHRpgHpkU=</binary>\n+\t\t\t\t\t</binaryDataArray>\n+\t\t\t\t</binaryDataArrayList>\n+\t\t\t</spectrum>\n+\t\t</spectrumList>\n+\t</run>\n+</mzML>\n+<indexList count="1">\n+\t<index name="spectrum">\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1215">4943</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1216">12545</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1217">20000</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1218">27067</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1219">33179</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1220">38693</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1221">43939</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1222">49122</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1223">55197</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1224">61932</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1225">68344</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1226">75881</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1227">82688</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1228">89640</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1229">96581</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1230">103086</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1231">109101</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1232">114765</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1233">120568</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1234">127412</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1235">134809</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1236">142840</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1237">150308</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1238">157219</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1239">164340</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1240">171137</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1241">177921</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1242">184497</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1243">191766</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1244">199091</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1245">206509</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1246">213514</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1247">220040</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1248">226684</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1249">232940</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1250">239073</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1251">244656</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1252">249772</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1253">254827</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1254">259607</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1255">264386</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1256">269250</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1257">274833</offset>\n+\t\t<offset idRef="controllerType=0 controllerNumber=1 scan=1258">280560</offset>\n+\t</index>\n+</indexList>\n+<indexListOffset>287471</indexListOffset>\n+<fileChecksum>0</fileChecksum>\n+</indexedmzML>\n\\ No newline at end of file\n' |