# RMassBank for XCMS

Erik Müller

#### 2 June 2022

# 1 Introduction

As the RMassBank-workflow is described in the other manual, this document mainly explains how to utilize the XCMS-, MassBank-, and peaklist-readMethods for Step 1 of the workflow.

# 2 Input files

## 2.1 LC/MS data

RMassBank handles high-resolution LC/MS spectra in mzML or mzdata format in centroid1 1 1 The term “centroid” here refers to any kind of data which are not in profile mode, i.e. don’t have continuous m/z data. It does not refer to the (mathematical) centroid peak, i.e. the area-weighted mass peak. or in profile mode.

Data in the examples was acquired using a QTOF instrument.

In the standard workflow, the file names are used to identify a compound: file names must be in the format `xxxxxxxx_1234_xxx.mzXML`, where the xxx parts denote anything and the 1234 part denotes the compound ID in the compound list (see below). Advanced and alternative uses can be implemented; consult the implementation of `msmsRead`, `msms_workflow` and `findMsMsHRperX.direct` for more information.

# 3 Additional Workflow-Methods

The data used in the following example is available as a package RMassBankData, so both libraries have to be installed to run this vignette.

    library(RMassBank)
    library(RMassBankData)

## 3.1 Options

In the first part of the workflow, spectra are extracted from the files and processed. In the following example, we will process the Glucolesquerellin spectra from the provided files.

For the workflow to work correctly, we use the default settings, and modify then to match the data acquisition method. The settings have to contain the same parameters as the mzR-method would for the workflow.

    RmbDefaultSettings()
    rmbo <- getOption("RMassBank")
    rmbo$spectraList <- list(
      list(mode="CID", ces="10eV", ce="10eV", res=12000),
      list(mode="CID", ces="20eV", ce="20eV", res=12000)
    )

    rmbo$multiplicityFilter <- 1
    rmbo$annotations$instrument <- "Bruker micrOTOFq"
    rmbo$annotations$instrument_type <- "LC-ESI-QTOF"
    rmbo$recalibrator$MS1 <- "recalibrate.identity"
    rmbo$recalibrator$MS2 <- "recalibrate.identity"
    options("RMassBank" = rmbo)

## 3.2 XCMS-workflow

First, a workspace for the `msmsWorkflow` must be created:

    msmsList <- newMsmsWorkspace()

The full paths of the files must be loaded into the container in the array `files`:

    msmsList@files <- list.files(system.file("spectra.Glucolesquerellin",
                                             package = "RMassBankData"),
                                 "Glucolesquerellin.*mzML", full.names=TRUE)

Note the position of the compound IDs in the filenames. Historically, the “`pos`” at the end was used to denote the polarity; it is obsolete now, but the ID must be terminated with an underscore. If you have multiple files for one compound, you have to give them the same ID, but thanks to the polarity at the end being obsolete, you can just enumerate them.

Additionally, the compound list must be loaded using `loadList`:

    loadList(system.file("list/PlantDataset.csv",package="RMassBankData"))

Basically, the changes to the workflow using XCMS can be described as follows:

The MS2-Spectra(and optionally the MS1-spectrum) are extracted and peakpicked using XCMS. You can pass different parameters for the `findPeaks` function of XCMS using the findPeaksArgs-argument to detect actual peaks. Then, CAMERA processes the peak lists and creates pseudospectra (or compound spectra). The obtained pseudospectra are stored in the array `specs`.

Please note that “findPeaksArgs” has to be a list with the list elements named after the arguments that the method you want to use contains, as findPeaks is called by `do.call`. For example, if you want to use centWave with a peakwidth from 5 to 12 and 25 ppm, findPeaksArgs would look like this:

    Args <- list(method="centWave",
                         peakwidth=c(5,12),
                         prefilter=c(0,0),
                         ppm=25, snthr=2)

If you want to utilize XCMS for Step 1 of the workflow, you have to set the readMethod-parameter to “xcms” and - if you don’t want to use standard values for findPeaks - pass on findPeaksArgs to the workflow.

    msmsList <- msmsRead(msmsList, files= msmsList@files,
                         readMethod = "xcms", mode = "mH", Args = Args, plots = TRUE)

    ## Provided scanrange was adjusted to 1 - 0

    ## Loading required package: xcms
    ## Loading required package: BiocParallel
    ## Loading required package: MSnbase
    ## Loading required package: BiocGenerics
    ##
    ## Attaching package: 'BiocGenerics'
    ##
    ## The following objects are masked from 'package:stats':
    ##
    ##     IQR, mad, sd, var, xtabs
    ##
    ## The following objects are masked from 'package:base':
    ##
    ##     Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    ##     as.data.frame, basename, cbind, colnames, dirname, do.call,
    ##     duplicated, eval, evalq, get, grep, grepl, intersect,
    ##     is.unsorted, lapply, mapply, match, mget, order, paste, pmax,
    ##     pmax.int, pmin, pmin.int, rank, rbind, rownames, sapply,
    ##     setdiff, sort, table, tapply, union, unique, unsplit,
    ##     which.max, which.min
    ##
    ## Loading required package: Biobase
    ## Welcome to Bioconductor
    ##
    ##     Vignettes contain introductory material; view with
    ##     'browseVignettes()'. To cite Bioconductor, see
    ##     'citation("Biobase")', and for packages
    ##     'citation("pkgname")'.
    ##
    ## Loading required package: mzR
    ## Loading required package: Rcpp
    ## Loading required package: S4Vectors
    ## Loading required package: stats4
    ##
    ## Attaching package: 'S4Vectors'
    ##
    ## The following objects are masked from 'package:base':
    ##
    ##     I, expand.grid, unname
    ##
    ## Loading required package: ProtGenerics
    ##
    ## Attaching package: 'ProtGenerics'
    ##
    ## The following object is masked from 'package:stats':
    ##
    ##     smooth
    ##
    ##
    ## This is MSnbase version 2.22.0
    ##   Visit https://lgatto.github.io/MSnbase/ to get started.
    ##
    ##
    ## Attaching package: 'MSnbase'
    ##
    ## The following object is masked from 'package:base':
    ##
    ##     trimws
    ##
    ##
    ## This is xcms version 3.18.0
    ##
    ##
    ## Attaching package: 'xcms'
    ##
    ## The following object is masked from 'package:stats':
    ##
    ##     sigma
    ##
    ## Warning in readRawData(fileName(object), includeMSn = includeMSn) :
    ##   No MS1 spectra available in file Glucolesquerellin_2184_1.mzML
    ## Provided scanrange was adjusted to 1 - 0
    ## Warning in .local(x, i, j = j, ..., drop) :
    ##   'i' has been sorted as subsetting supports only sorted indices.
    ## Warning in min(x) : no non-missing arguments to min; returning Inf
    ## Warning in max(x) : no non-missing arguments to max; returning -Inf
    ## MS2 spectra without precursorScan references, using estimationWarning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in .local(object, ...) :
    ##   MS2 spectra without precursorIntensity, setting to zero

    ## Detecting mass traces at 25 ppm ... OK
    ## Detecting chromatographic peaks in 40 regions of interest ... OK: 29 found.
    ## Provided scanrange was adjusted to 1 - 0
    ## Loading required package: xcms
    ## Loading required package: BiocParallel
    ## Loading required package: MSnbase
    ## Loading required package: BiocGenerics
    ##
    ## Attaching package: 'BiocGenerics'
    ##
    ## The following objects are masked from 'package:stats':
    ##
    ##     IQR, mad, sd, var, xtabs
    ##
    ## The following objects are masked from 'package:base':
    ##
    ##     Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    ##     as.data.frame, basename, cbind, colnames, dirname, do.call,
    ##     duplicated, eval, evalq, get, grep, grepl, intersect,
    ##     is.unsorted, lapply, mapply, match, mget, order, paste, pmax,
    ##     pmax.int, pmin, pmin.int, rank, rbind, rownames, sapply,
    ##     setdiff, sort, table, tapply, union, unique, unsplit,
    ##     which.max, which.min
    ##
    ## Loading required package: Biobase
    ## Welcome to Bioconductor
    ##
    ##     Vignettes contain introductory material; view with
    ##     'browseVignettes()'. To cite Bioconductor, see
    ##     'citation("Biobase")', and for packages
    ##     'citation("pkgname")'.
    ##
    ## Loading required package: mzR
    ## Loading required package: Rcpp
    ## Loading required package: S4Vectors
    ## Loading required package: stats4
    ##
    ## Attaching package: 'S4Vectors'
    ##
    ## The following objects are masked from 'package:base':
    ##
    ##     I, expand.grid, unname
    ##
    ## Loading required package: ProtGenerics
    ##
    ## Attaching package: 'ProtGenerics'
    ##
    ## The following object is masked from 'package:stats':
    ##
    ##     smooth
    ##
    ##
    ## This is MSnbase version 2.22.0
    ##   Visit https://lgatto.github.io/MSnbase/ to get started.
    ##
    ##
    ## Attaching package: 'MSnbase'
    ##
    ## The following object is masked from 'package:base':
    ##
    ##     trimws
    ##
    ##
    ## This is xcms version 3.18.0
    ##
    ##
    ## Attaching package: 'xcms'
    ##
    ## The following object is masked from 'package:stats':
    ##
    ##     sigma
    ##
    ## Warning in readRawData(fileName(object), includeMSn = includeMSn) :
    ##   No MS1 spectra available in file Glucolesquerellin_2184_2.mzML
    ## Provided scanrange was adjusted to 1 - 0
    ## Warning in .local(x, i, j = j, ..., drop) :
    ##   'i' has been sorted as subsetting supports only sorted indices.
    ## Warning in min(x) : no non-missing arguments to min; returning Inf
    ## Warning in max(x) : no non-missing arguments to max; returning -Inf
    ## MS2 spectra without precursorScan references, using estimationWarning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in max(which(object@scantime < object@msnRt[a])) :
    ##   no non-missing arguments to max; returning -Inf
    ## Warning in .local(object, ...) :
    ##   MS2 spectra without precursorIntensity, setting to zero
    ##
    ##
    ## Detecting mass traces at 25 ppm ... OK
    ## Detecting chromatographic peaks in 32 regions of interest ... OK: 29 found.

    msmsList <- msmsWorkflow(msmsList, steps=2:8,
                             mode="mH", readMethod="xcms")

You can of course run the rest of the workflow as usual, by - like here - setting steps to 1:8

## 3.3 Export the records

To export the records from the XCMS workflow, follow the same procedure as the standard RMassBank workflow, i.e.:

    mb <- newMbWorkspace(msmsList)
    mb <- resetInfolists(mb)
    mb <- loadInfolist(mb,system.file("infolists/PlantDataset.csv",
                                      package = "RMassBankData"))
    # Step
    mb <- mbWorkflow(mb, steps=1:8)

## 3.4 peaklist-workflow

The peaklist-workflow works akin to the normal mzR-workflow with the only difference being, that the supplied data has to be in .csv format and contain 2 columns: “mz” and “int”. You can look at an example file in the RMassBankData-package in spectra.Glucolesquerellin. Please note that the naming of the csv has to be similar to the mzdata-files, with the only difference being the filename extension. The readMethod name for this is “peaklist”

    msmsPeaklist <- newMsmsWorkspace()
    msmsPeaklist@files <- list.files(system.file("spectra.Glucolesquerellin",
                                                 package = "RMassBankData"),
                                     "Glucolesquerellin.*csv", full.names=TRUE)
    msmsPeaklist <- msmsWorkflow(msmsPeaklist, steps=1:8,
                                 mode="mH", readMethod="peaklist")

The records can then be generated and exported with `mbWorkflow`.

# 4 Session information

    sessionInfo()

    ## R version 4.2.0 (2022-04-22 ucrt)
    ## Platform: x86_64-w64-mingw32/x64 (64-bit)
    ## Running under: Windows Server x64 (build 20348)
    ##
    ## Matrix products: default
    ##
    ## locale:
    ## [1] LC_COLLATE=C
    ## [2] LC_CTYPE=English_United States.utf8
    ## [3] LC_MONETARY=English_United States.utf8
    ## [4] LC_NUMERIC=C
    ## [5] LC_TIME=English_United States.utf8
    ##
    ## attached base packages:
    ## [1] stats     graphics  grDevices utils     datasets  methods   base
    ##
    ## other attached packages:
    ## [1] gplots_3.1.3         RMassBankData_1.34.0 RMassBank_3.6.1
    ## [4] Rcpp_1.0.8.3         BiocStyle_2.24.0
    ##
    ## loaded via a namespace (and not attached):
    ##   [1] snow_0.4-4                  backports_1.4.1
    ##   [3] Hmisc_4.7-0                 igraph_1.3.1
    ##   [5] plyr_1.8.7                  CAMERA_1.52.0
    ##   [7] fingerprint_3.5.7           splines_4.2.0
    ##   [9] BiocParallel_1.30.2         ChemmineR_3.48.0
    ##  [11] GenomeInfoDb_1.32.2         ggplot2_3.3.6
    ##  [13] digest_0.6.29               foreach_1.5.2
    ##  [15] htmltools_0.5.2             magick_2.7.3
    ##  [17] fansi_1.0.3                 checkmate_2.1.0
    ##  [19] magrittr_2.0.3              cluster_2.1.3
    ##  [21] doParallel_1.0.17           limma_3.52.1
    ##  [23] rcdklibs_2.3                matrixStats_0.62.0
    ##  [25] R.utils_2.11.0              MsFeatures_1.4.0
    ##  [27] jpeg_0.1-9                  colorspace_2.0-3
    ##  [29] rvest_1.0.2                 xfun_0.31
    ##  [31] dplyr_1.0.9                 crayon_1.5.1
    ##  [33] RCurl_1.98-1.6              jsonlite_1.8.0
    ##  [35] graph_1.74.0                impute_1.70.0
    ##  [37] survival_3.3-1              iterators_1.0.14
    ##  [39] glue_1.6.2                  gtable_0.3.0
    ##  [41] zlibbioc_1.42.0             XVector_0.36.0
    ##  [43] DelayedArray_0.22.0         webchem_1.1.2
    ##  [45] BiocGenerics_0.42.0         DEoptimR_1.0-11
    ##  [47] scales_1.2.0                vsn_3.64.0
    ##  [49] DBI_1.1.2                   data.tree_1.0.0
    ##  [51] mzR_2.30.0                  htmlTable_2.4.0
    ##  [53] clue_0.3-61                 foreign_0.8-82
    ##  [55] preprocessCore_1.58.0       Formula_1.2-4
    ##  [57] stats4_4.2.0                MsCoreUtils_1.8.0
    ##  [59] rsvg_2.3.1                  DT_0.23
    ##  [61] htmlwidgets_1.5.4           httr_1.4.3
    ##  [63] RColorBrewer_1.1-3          ellipsis_0.3.2
    ##  [65] pkgconfig_2.0.3             XML_3.99-0.9
    ##  [67] rJava_1.0-6                 R.methodsS3_1.8.1
    ##  [69] nnet_7.3-17                 sass_0.4.1
    ##  [71] utf8_1.2.2                  tidyselect_1.1.2
    ##  [73] rlang_1.0.2                 munsell_0.5.0
    ##  [75] tools_4.2.0                 cli_3.3.0
    ##  [77] generics_0.1.2              evaluate_0.15
    ##  [79] stringr_1.4.0               fastmap_1.1.0
    ##  [81] mzID_1.34.0                 yaml_2.3.5
    ##  [83] readJDX_0.6.1               knitr_1.39
    ##  [85] robustbase_0.95-0           caTools_1.18.2
    ##  [87] purrr_0.3.4                 RANN_2.6.1
    ##  [89] ncdf4_1.19                  RBGL_1.72.0
    ##  [91] R.oo_1.24.0                 xml2_1.3.3
    ##  [93] rstudioapi_0.13             compiler_4.2.0
    ##  [95] curl_4.3.2                  png_0.1-7
    ##  [97] affyio_1.66.0               MassSpecWavelet_1.62.0
    ##  [99] tibble_3.1.7                bslib_0.3.1
    ## [101] stringi_1.7.6               highr_0.9
    ## [103] logger_0.2.2                MSnbase_2.22.0
    ## [105] lattice_0.20-45             ProtGenerics_1.28.0
    ## [107] Matrix_1.4-1                vctrs_0.4.1
    ## [109] pillar_1.7.0                lifecycle_1.0.1
    ## [111] BiocManager_1.30.18         jquerylib_0.1.4
    ## [113] MALDIquant_1.21             data.table_1.14.2
    ## [115] bitops_1.0-7                xcms_3.18.0
    ## [117] GenomicRanges_1.48.0        R6_2.5.1
    ## [119] latticeExtra_0.6-29         pcaMethods_1.88.0
    ## [121] affy_1.74.0                 bookdown_0.26
    ## [123] KernSmooth_2.23-20          gridExtra_2.3
    ## [125] IRanges_2.30.0              codetools_0.2-18
    ## [127] MASS_7.3-57                 gtools_3.9.2.1
    ## [129] assertthat_0.2.1            SummarizedExperiment_1.26.1
    ## [131] rjson_0.2.21                S4Vectors_0.34.0
    ## [133] GenomeInfoDbData_1.2.8      parallel_4.2.0
    ## [135] rcdk_3.6.0                  rpart_4.1.16
    ## [137] grid_4.2.0                  rmarkdown_2.14
    ## [139] MatrixGenerics_1.8.0        itertools_0.1-3
    ## [141] Biobase_2.56.0              base64enc_0.1-3