Skip to content



The main documentation for Feature-Based Molecular Networking (FBMN) can be accessed here. See our preprint on bioaRxiv.

Below follows a description on how to use XCMS (ver. >= 3) with the FBMN workflow on GNPS.

Mass spectrometry processing with XCMS

Citations and development

This work builds on the efforts of our many colleagues, please cite their work:

Nothias, L.F. et al Feature-based Molecular Networking in the GNPS Analysis Environment bioRxiv 812404 (2019).

Wang, M. et al. Sharing and community curation of mass spectrometry data with Global Natural Products Social Molecular Networking. Nat. Biotechnol. 34, 828–837 (2016).

XCMS3 GitHub repository:

Tautenhahn R, Boettcher C, Neumann S. Highly sensitive feature detection for high resolution LC/MS BMC Bioinformatics, 9:504 (2008).

Smith, C.A., Want, E.J., O'Maille, G., Abagyan,R., Siuzdak, G. XCMS: Processing mass spectrometry data for metabolite profiling using nonlinear peak alignment, matching and identification. Analytical Chemistry, 78, 779–787 (2006).


1 - Install the latest version of XCMS3 from Bioconductor (ver. >= 3.4) in R with:


Alternatively, see the [xcms Bioconductor package] (

2 - Retrieve the custom utility function from the XCMS-GNPS-TOOLS GitHub repository

Mass Spectrometry Data Processing with XCMS.

1. Introduction

Below we are presenting the key steps required to process with XCMS non-targeted LC-MS/MS data collected using data dependent acquisition. For more information on XCMS, consult these resources:

SCRIPT AVAILABILITY: Example of XCMS scripts are accessible as Jupyter notebook and RCommander script on

IMPORTANT: XCMS parameters will vary depending on the mass spectrometer, the acquisition parameters, and the samples investigated. The following documentation serves as a basic guideline for using XCMS with the Feature-Based Molecular Networking workflow.

2. Convert your Data

XCMS accepts different input formats. Note that we recommand to convert your files to the mzML format before using XCMS for processing. See the documentation here. This will simplify the subsquent use of other mass spectrometry tools and data deposition on a public repository like MassIVE or MetaboLights.

3. Process with XCMS

These are typical steps used for the processing of non-targeted LC-MS/MS data with XCMS:

  1. Import data (readMSData)
  2. Peak picking (findChromPeaks)
  3. Retention time alignment (adjustRtime).
  4. Peak grouping (groupChromPeaks).
  5. Gap filling (fillChromPeaks).
  6. Run CAMERA for adduct annotation (xsAnnotate).
  7. Export the results file for FBMN on GNPS:
    • Option A - Export a feature quantification table and a MS/MS spectral summary file:
      • Export a feature quantification table with ion intensities (.TXT file format) (writeMgfData).
      • Export a MS/MS spectral summary file (.MGF file format). Note that it is recommended to use the maxTIC option for the MGF export. (write.table)
    • Option B - Export an mzTab-M file:

      • Export and select the mzTab-M file in the interface. The use of the mzTab-M requires the subsequent upload of the mzML files used during the XCMS processing. See and cite this publication.

Perform FBMN on GNPS

The files exported from XCMS3 can be uploaded to the GNPS web-platform and a Feature-Based Molecular Networking job can be launched.

FBMN with XCMS3 can be performed either using the [Superquick FBMN start page] ( or the standard interface of the FBMN workflow (you need to be logged in GNPS first).

More information on the Feature Based Molecular Networking workflow on GNPS can be obtained at this documentation page.

Note that you can upload a metadata table with your job. See documentation.


Representative results files and job

Option A - With a feature quantification table and a MS/MS spectral summary file:

  1. The feature quantification table (.TXT file) - Download here
  2. The MS/MS spectral summary (.MGF file) - Download here
  3. (Optional) The metadata table - Download here

Here is an example FBMN job with XCMS from a subset of the American Gut Project.

Option B - With a mzTab-M file:

TODO: Finish this section

  1. The mzTab-M file - Download here
  2. The corresponding mzML file(s) - Download here

Here is an example FBMN job with XCMS using a mzTab-M file and mzML files from a subset of the American Gut Project.


See our FBMN tutorial with XCMS using a subset of the American Gut Project samples on this repository DorresteinLaboratory/XCMS3_FeatureBasedMN/.


Johannes Rainer (Eurac Research), Madeleine Ernst (UCSD), Ricardo da Silva (UCSD), Michael Witting (Helmholtz Zentrum Munich)

Join the GNPS Community !

Page Contributors

Ming Wang (7.69%), lfnothias (59.44%), Madeleine Ernst (16.08%), Ivan Protsyuk (0.7%), jorainer (16.08%)

Last update: June 13, 2020 23:18:29