Skip to content

Commit

Permalink
Added XCMS plotting tools (#267)
Browse files Browse the repository at this point in the history
Added XCMS plotting tools

---------

Co-authored-by: Björn Grüning <bjoern@gruenings.eu>
Co-authored-by: Zargham Ahmad <zargham.ahmad12@gmail.com>
  • Loading branch information
3 people authored Jul 15, 2024
1 parent eba1150 commit eca29d4
Show file tree
Hide file tree
Showing 8 changed files with 4,189 additions and 1 deletion.
35 changes: 34 additions & 1 deletion tools/xcms/.shed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,38 @@ repositories:
owner: lecorguille
include:
[*default-includes, msnbase_readmsdata.xml, msnbase_readmsdata.r, macros_msnbase.xml]

xcms_plot_raw:
description: Plot raw mzml file content with xcms
long_description: |
This suite provides tools from the XCMS package to visualize extracted ion chromatograms and raw data
from a single mzML file. Users can define m/z and retention time (rt) values, and the suite plots data
with a user-defined tolerance and rt range centered around the selected m/z and rt values.
The MsExperiment plot function creates a two-dimensional view of three-dimensional mass spectrometry data,
displaying peaks in the two-dimensional m/z versus retention time plane with intensity color-coding. The plot
is saved as a PNG file
owner: workflow4metabolomics
type: unrestricted
include:
- xcms_plot_raw.xml
- macros_xcms_plot.xml
- test-data/raw_plot.png
- test-data/xcms_plot_raw_testdata.mzML
xcms_plot_eic:
description: Plot EIC using xcms
long_description: |
This suite provides tools from the XCMS package to visualize extracted ion chromatograms and raw data
from a single mzML file. Users can define m/z and retention time (rt) values, and the suite plots data
with a user-defined tolerance and rt range centered around the selected m/z and rt values.
The MsExperiment plot function creates a two-dimensional view of three-dimensional mass spectrometry data,
displaying peaks in the two-dimensional m/z versus retention time plane with intensity color-coding. The plot
is saved as a PNG file
owner: workflow4metabolomics
type: unrestricted
include:
- xcms_plot_eic.xml
- macros_xcms_plot.xml
- test-data/eic_plot.png
- test-data/xcms_plot_eic_testdata.mzML
suite:
name: suite_xcms
owner: lecorguille
Expand All @@ -122,3 +153,5 @@ suite:
http://www.bioconductor.org/packages/release/bioc/html/xcms.html
XCMS: processing mass spectrometry data for metabolite profiling
using nonlinear peak alignment, matching, and identification
38 changes: 38 additions & 0 deletions tools/xcms/macros_xcms_plot.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<macros>
<token name="@TOOL_VERSION@">4.0.0</token>
<xml name="creator">
<creator>
<person
givenName="Wudmir"
familyName="Rojas"
url="https://github.com/wverastegui"
identifier="0000-0001-7036-9987" />
<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="bio.tools">
<xrefs>
<xref type="bio.tools">XCMS</xref>
</xrefs>
</xml>
<xml name="base_params">
<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"/>
</xml>
<xml name="citations">
<citations>
<citation type="doi">10.1021/ac051437y</citation>
<citation type="doi">10.3390/metabo12020173</citation>
<citation type="doi">10.5281/zenodo.11185520</citation>
</citations>
</xml>
</macros>
Binary file added tools/xcms/test-data/eic_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tools/xcms/test-data/raw_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3,801 changes: 3,801 additions & 0 deletions tools/xcms/test-data/xcms_plot_eic_testdata.mzML

Large diffs are not rendered by default.

212 changes: 212 additions & 0 deletions tools/xcms/test-data/xcms_plot_raw_testdata.mzML
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<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">
<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">
<cvList count="5">
<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"/>
<cv id="UO" fullName="Unit Ontology" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo"/>
<cv id="BTO" fullName="BrendaTissue545" version="unknown" URI="http://www.brenda-enzymes.info/ontology/tissue/tree/update/update_files/BrendaTissueOBO"/>
<cv id="GO" fullName="Gene Ontology - Slim Versions" version="unknown" URI="http://www.geneontology.org/GO_slims/goslim_goa.obo"/>
<cv id="PATO" fullName="Quality ontology" version="unknown" URI="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/phenotype/quality.obo"/>
</cvList>
<fileDescription>
<fileContent>
<cvParam cvRef="MS" accession="MS:1000294" name="mass spectrum" />
</fileContent>
<sourceFileList count="1">
<sourceFile id="sf_ru_0" name="RCX_06_shortened.mzML" location="file:///C:/Users/473355/Downloads">
<cvParam cvRef="MS" accession="MS:1000569" name="SHA-1" value="6c9fc5a54e7e588b4940994f66c953de66f8e8c5" />
<cvParam cvRef="MS" accession="MS:1000584" name="mzML format" />
<cvParam cvRef="MS" accession="MS:1000777" name="spectrum identifier nativeID format" />
</sourceFile>
</sourceFileList>
</fileDescription>
<sampleList count="1">
<sample id="sa_0" name="">
<cvParam cvRef="MS" accession="MS:1000004" name="sample mass" value="0" unitAccession="UO:0000021" unitName="gram" unitCvRef="UO" />
<cvParam cvRef="MS" accession="MS:1000005" name="sample volume" value="0" unitAccession="UO:0000098" unitName="milliliter" unitCvRef="UO" />
<cvParam cvRef="MS" accession="MS:1000006" name="sample concentration" value="0" unitAccession="UO:0000175" unitName="gram per liter" unitCvRef="UO" />
</sample>
</sampleList>
<softwareList count="2">
<software id="so_in_0" version="" >
<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
</software>
<software id="so_default" version="" >
<cvParam cvRef="MS" accession="MS:1000799" name="custom unreleased software tool" value="" />
</software>
</softwareList>
<instrumentConfigurationList count="1">
<instrumentConfiguration id="ic_0">
<cvParam cvRef="MS" accession="MS:1000031" name="instrument model" />
<softwareRef ref="so_in_0" />
</instrumentConfiguration>
</instrumentConfigurationList>
<dataProcessingList count="1">
<dataProcessing id="dp_sp_0">
<processingMethod order="0" softwareRef="so_default">
<cvParam cvRef="MS" accession="MS:1000544" name="Conversion to mzML" />
<userParam name="warning" type="xsd:string" value="fictional processing method used to fulfill format requirements" />
</processingMethod>
</dataProcessing>
</dataProcessingList>
<run id="ru_0" defaultInstrumentConfigurationRef="ic_0" sampleRef="sa_0" defaultSourceFileRef="sf_ru_0">
<userParam name="mzml_id" type="xsd:string" value="MZmine mzML export"/>
<spectrumList count="4" defaultDataProcessingRef="dp_sp_0">
<spectrum id="scan=126" index="0" defaultArrayLength="31" dataProcessingRef="dp_sp_0">
<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" />
<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="1" />
<cvParam cvRef="MS" accession="MS:1000294" name="mass spectrum" />
<cvParam cvRef="MS" accession="MS:1000285" name="total ion current" value="6.0450043e09"/>
<cvParam cvRef="MS" accession="MS:1000528" name="lowest observed m/z" value="108.907723264639685" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS"/>
<cvParam cvRef="MS" accession="MS:1000527" name="highest observed m/z" value="1111.100247713231283" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS"/>
<userParam name="filter string" type="xsd:string" value="FTMS + p ESI Full ms [110.0000-1100.0000]"/>
<scanList count="1">
<cvParam cvRef="MS" accession="MS:1000795" name="no combination" />
<scan >
<cvParam cvRef="MS" accession="MS:1000016" name="scan start time" value="171.55917" unitAccession="UO:0000010" unitName="second" unitCvRef="UO" />
<userParam name="MS:1000130" type="xsd:string" value=""/>
<scanWindowList count="1">
<scanWindow>
<cvParam cvRef="MS" accession="MS:1000501" name="scan window lower limit" value="110" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS" />
<cvParam cvRef="MS" accession="MS:1000500" name="scan window upper limit" value="1100" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS" />
</scanWindow>
</scanWindowList>
</scan>
</scanList>
<binaryDataArrayList count="2">
<binaryDataArray encodedLength="332">
<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS" />
<cvParam cvRef="MS" accession="MS:1000523" name="64-bit float" />
<cvParam cvRef="MS" accession="MS:1000576" name="no compression" />
<binary>r5exsg4iY0CIh5zHECJjQFnOh9wSImNAI2xz8RQiY0DoYF8GFyJjQKWsSxsZImNAXU84MBsiY0ANSSVFHSJjQLiZElofImNAXUEAbyEiY0D8P+6DIyJjQJOV3JglImNAJkLLrSciY0DAvI+5WyJjQNE+h85dImNA4Bd/418iY0DqR3f4YSJjQO/Obw1kImNA8qxoImYiY0DPgTgP4yJjQHoaRiTlImNAJgpUOeciY0DTUGJO6SJjQIDucGPrImNAL+N/eO0iY0AdcL2ZPCNjQC+m2a4+I2NARjP2w0AjY0BhFxPZQiNjQIBSMO5EI2NAo+RNA0cjY0A=</binary>
</binaryDataArray>
<binaryDataArray encodedLength="168">
<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" unitAccession="MS:1000131" unitName="number of detector counts" unitCvRef="MS"/>
<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" />
<cvParam cvRef="MS" accession="MS:1000576" name="no compression" />
<binary>n7xcRxLCpkdqnyZJdS8vSqhE/UqdaFZLB+CHS17TUEvmdfVKVOwpSrriTEnEfoNIuSX9R9s+AkfErrtHYdANSIrABki7tKBH5HDURtM8ekc5hvNHwH4WSPywAkjmQaxHN1ktR2ZZFEeHy8hHHs8kSFVNMEgs2v1HAyl6Rw==</binary>
</binaryDataArray>
</binaryDataArrayList>
</spectrum>
<spectrum id="scan=127" index="1" defaultArrayLength="25">
<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" />
<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="1" />
<cvParam cvRef="MS" accession="MS:1000294" name="mass spectrum" />
<cvParam cvRef="MS" accession="MS:1000285" name="total ion current" value="7.4992742e09"/>
<cvParam cvRef="MS" accession="MS:1000528" name="lowest observed m/z" value="108.907733023156396" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS"/>
<cvParam cvRef="MS" accession="MS:1000527" name="highest observed m/z" value="1111.100738826513407" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS"/>
<userParam name="filter string" type="xsd:string" value="FTMS + p ESI Full ms [110.0000-1100.0000]"/>
<scanList count="1">
<cvParam cvRef="MS" accession="MS:1000795" name="no combination" />
<scan >
<cvParam cvRef="MS" accession="MS:1000016" name="scan start time" value="171.92241" unitAccession="UO:0000010" unitName="second" unitCvRef="UO" />
<userParam name="MS:1000130" type="xsd:string" value=""/>
<scanWindowList count="1">
<scanWindow>
<cvParam cvRef="MS" accession="MS:1000501" name="scan window lower limit" value="110" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS" />
<cvParam cvRef="MS" accession="MS:1000500" name="scan window upper limit" value="1100" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS" />
</scanWindow>
</scanWindowList>
</scan>
</scanList>
<binaryDataArrayList count="2">
<binaryDataArray encodedLength="268">
<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS" />
<cvParam cvRef="MS" accession="MS:1000523" name="64-bit float" />
<cvParam cvRef="MS" accession="MS:1000576" name="no compression" />
<binary>dPjCarchY0C7p59/uSFjQPetfJS7IWNAKgtaqb0hY0BUvze+vyFjQHPKFdPBIWNAiiz058MhY0Bu8yXYDiJjQFnnEO0QImNAPTL8ARMiY0Ab1OcWFSJjQPPM0ysXImNAwxzAQBkiY0COw6xVGyJjQFPBmWodImNAEBaHfx8iY0DIwXSUISJjQHrEYqkjImNAJR5RviUiY0AdSg3KWSJjQEd5BN9bImNAa//7810iY0CN3PMIYCJjQKsQ7B1iImNAxJvkMmQiY0A=</binary>
</binaryDataArray>
<binaryDataArray encodedLength="136">
<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" unitAccession="MS:1000131" unitName="number of detector counts" unitCvRef="MS"/>
<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" />
<cvParam cvRef="MS" accession="MS:1000576" name="no compression" />
<binary>weaTRwOtJUhmbmtIh5J4SCCxVEjhYRNIjwmRR+TAMEdkshZIpwk/SSEqK0oxl+hKWLdCS2T2dEsDhjxLo73dSiRWF0r3fBRJ/KUYRzb5mkf1fQ5IkJ9ASD4EO0hfe+dHrvn+Rg==</binary>
</binaryDataArray>
</binaryDataArrayList>
</spectrum>
<spectrum id="scan=128" index="2" defaultArrayLength="18">
<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" />
<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="1" />
<cvParam cvRef="MS" accession="MS:1000294" name="mass spectrum" />
<cvParam cvRef="MS" accession="MS:1000285" name="total ion current" value="6.3630976e09"/>
<cvParam cvRef="MS" accession="MS:1000528" name="lowest observed m/z" value="108.907709764292704" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS"/>
<cvParam cvRef="MS" accession="MS:1000527" name="highest observed m/z" value="1111.100125670347097" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS"/>
<userParam name="filter string" type="xsd:string" value="FTMS + p ESI Full ms [110.0000-1100.0000]"/>
<scanList count="1">
<cvParam cvRef="MS" accession="MS:1000795" name="no combination" />
<scan >
<cvParam cvRef="MS" accession="MS:1000016" name="scan start time" value="172.28342" unitAccession="UO:0000010" unitName="second" unitCvRef="UO" />
<userParam name="MS:1000130" type="xsd:string" value=""/>
<scanWindowList count="1">
<scanWindow>
<cvParam cvRef="MS" accession="MS:1000501" name="scan window lower limit" value="110" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS" />
<cvParam cvRef="MS" accession="MS:1000500" name="scan window upper limit" value="1100" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS" />
</scanWindow>
</scanWindowList>
</scan>
</scanList>
<binaryDataArrayList count="2">
<binaryDataArray encodedLength="192">
<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS" />
<cvParam cvRef="MS" accession="MS:1000523" name="64-bit float" />
<cvParam cvRef="MS" accession="MS:1000576" name="no compression" />
<binary>ccJIT7shY0AdGCZkvSFjQL/EA3m/IWNAV8jhjcEhY0DlIsCiwyFjQGvUnrfFIWNAt3Dwkg4iY0AbXdunECJjQHigxrwSImNAzjqy0RQiY0AeLJ7mFiJjQGd0ivsYImNAqhN3EBsiY0DmCWQlHSJjQBxXUTofImNATPs+TyEiY0B39ixkIyJjQJpIG3klImNA</binary>
</binaryDataArray>
<binaryDataArray encodedLength="96">
<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" unitAccession="MS:1000131" unitName="number of detector counts" unitCvRef="MS"/>
<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" />
<cvParam cvRef="MS" accession="MS:1000576" name="no compression" />
<binary>MpSAR7CKlkfSH7ZH8ADIR47vl0elaPRGkTmOR/0nH0gVxxNJXw/6SSlRrkpz4hJLaZY8S4KkE0vEPa5KZiHvSTSj30hQKRBH</binary>
</binaryDataArray>
</binaryDataArrayList>
</spectrum>
<spectrum id="scan=129" index="3" defaultArrayLength="31">
<cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" />
<cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="1" />
<cvParam cvRef="MS" accession="MS:1000294" name="mass spectrum" />
<cvParam cvRef="MS" accession="MS:1000285" name="total ion current" value="5.5177718e09"/>
<cvParam cvRef="MS" accession="MS:1000528" name="lowest observed m/z" value="108.907641099520376" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS"/>
<cvParam cvRef="MS" accession="MS:1000527" name="highest observed m/z" value="1111.099388375058879" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS"/>
<userParam name="filter string" type="xsd:string" value="FTMS + p ESI Full ms [110.0000-1100.0000]"/>
<scanList count="1">
<cvParam cvRef="MS" accession="MS:1000795" name="no combination" />
<scan >
<cvParam cvRef="MS" accession="MS:1000016" name="scan start time" value="172.64467" unitAccession="UO:0000010" unitName="second" unitCvRef="UO" />
<userParam name="MS:1000130" type="xsd:string" value=""/>
<scanWindowList count="1">
<scanWindow>
<cvParam cvRef="MS" accession="MS:1000501" name="scan window lower limit" value="110" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS" />
<cvParam cvRef="MS" accession="MS:1000500" name="scan window upper limit" value="1100" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS" />
</scanWindow>
</scanWindowList>
</scan>
</scanList>
<binaryDataArrayList count="2">
<binaryDataArray encodedLength="332">
<cvParam cvRef="MS" accession="MS:1000514" name="m/z array" unitAccession="MS:1000040" unitName="m/z" unitCvRef="MS" />
<cvParam cvRef="MS" accession="MS:1000523" name="64-bit float" />
<cvParam cvRef="MS" accession="MS:1000576" name="no compression" />
<binary>v/C4pr4hY0B13Za7wCFjQCMhddDCIWNAx7tT5cQhY0BirTL6xiFjQPT1EQ/JIWNAwtKM1Q8iY0A9/3fqESJjQLGCY/8TImNAH11PFBYiY0CGjjspGCJjQOgWKD4aImNAQvYUUxwiY0CWLAJoHiJjQOW573wgImNALZ7dkSIiY0Bu2cumJCJjQKprursmImNA4VSp0CgiY0CGbJeIVCJjQE3PjZ1WImNAEImEslgiY0DPmXvHWiJjQIkBc9xcImNAQcBq8V4iY0D01WIGYSJjQKGC19E/I2NAY0z05kEjY0ApbRH8QyNjQPTkLhFGI2NAwrNMJkgjY0A=</binary>
</binaryDataArray>
<binaryDataArray encodedLength="168">
<cvParam cvRef="MS" accession="MS:1000515" name="intensity array" unitAccession="MS:1000131" unitName="number of detector counts" unitCvRef="MS"/>
<cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" />
<cvParam cvRef="MS" accession="MS:1000576" name="no compression" />
<binary>fv0oRj9abEfoz8tHM/PIR0Q2f0eGNfFGwRgcSAr2V0icrD9JxtcqSvxEwErt4BlLlFcpSyPp6UqapnlK1o6YSfuKpEjqzglIZ2WBR8B3u0bDlYJHQfIASNx2I0hHr5NH7dsiRw69pUYm4wdHO6CKR0+FkEcPBkJHQvz1Rg==</binary>
</binaryDataArray>
</binaryDataArrayList>
</spectrum>
</spectrumList>
</run>
</mzML>
<indexList count="1">
<index name="spectrum">
<offset idRef="scan=126">3577</offset>
<offset idRef="scan=127">6508</offset>
<offset idRef="scan=128">9315</offset>
<offset idRef="scan=129">12005</offset>
</index>
</indexList>
<indexListOffset>14938</indexListOffset>
<fileChecksum>0</fileChecksum>
</indexedmzML>
Loading

0 comments on commit eca29d4

Please sign in to comment.