createSTDdbLC: Create an in-house database for LC-MS annotation

View source: R/createSTDdbLC.R

createSTDdbLCR Documentation

Create an in-house database for LC-MS annotation


For creating an in-house instrument-specific annotation database, injections of pure standards need to be processed. For each standard the analyst provides a validated reference value for retention time and m/z, generally corresponding to the major ionic signal for this compound. On the bases of this data, the database is constructed by automatically extracting the features identified in the vicinity of the retention time of the standard.
The function generateSTDdbLC is not meant to be called directly - use createSTDdbLC instead.


createSTDdbLC(stdInfo, settings, polarity, Ithr = 10, nSlaves = 0)
generateStdDBLC(stdxsets, settings, Ithr) 



Information of the standards, given in the form of a data.frame. Minimal information: stdFile, compound, ChemSpiderID, observed m/z (mz.observed), and retention time in miutes (RTman). The filenames in slot stdFile should include path information.


A list of settings, to be used in peak picking and pattern comparison (see details).


The polarity of the injection: "positive" or "negative"


The intensity threshold used to decide weather or not a feature should be included in the DB. Typically acting on the maxo value.


A list of CAMERA objects resulting from the analysis (performed by processStandards) of the standard injections listed in the stdInfo table.


Number of cores to be used in peak picking.


The DB is created with the following workflow. Peak picking is performed on each standard file by using the settings specified in the settings list. CAMERA is used to group together the different features by considering their retention time and the correlation among the extracted ion traces. The list of features is searched looking for the values for mz and Rt included in the stdInfo table (see the help of exptable for more details), with the mass and retention time tolerances specified in the "DBconstruction" element of the settings list. In presence of positive match for the feature f, a spectral fingerprint is constructed by using all the features with an intensity bigger than Ithr which are in the same pcgroup of f. A match is retained only if the spectral fingerprint is composed of more than minfeat elements. This parameter is also included in the list of settings.


A list with three elements.


the original table used for the creation of the DB.


a list with the settings used for the DB generation and the date.


the DB which can be used in runLC for annotation.


Pietro Franceschi


if (require(metaMSdata)) {
  ##  load the manually curated table for the standards
  ## add location of cdf file from which the standards DB is going to be
  ## built - this depends on your platform and requires the metaMSdata package
  cdfpath <- system.file("extdata", package = "metaMSdata")
  ## files 
  files <- list.files(cdfpath, "_RP_", full.names=TRUE)
  ## get the complete names for the files
  exptable$stdFile <-
  ## Not run: 
  ## load the settings for the analysis
  ## set the minimum number of features to 2
  metaSetting(Synapt.RP, "DBconstruction")$minfeat  <- 2
  ## create the DB
  LCDBtest <- createSTDdbLC(stdInfo=exptable, 
                            settings = Synapt.RP,
                            polarity = "positive",
                            Ithr = 20)
## End(Not run)                 
  ## saved in "LCDBtest.RData" in the data directory of the metaMS
  ## package


rwehrens/metaMS documentation built on Feb. 27, 2023, 5:13 a.m.