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

Description Usage Arguments Details Value Author(s) Examples

View source: R/createSTDdbLC.R

Description

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.

Usage

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

Arguments

stdInfo

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.

settings

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

polarity

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

Ithr

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

stdxsets

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

nSlaves

Number of cores to be used in peak picking.

Details

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.

Value

A list with three elements.

Reftable

the original table used for the creation of the DB.

Info

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

DB

the DB which can be used in runLC for annotation.

Author(s)

Pietro Franceschi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
if (require(metaMSdata)) {
  ##  load the manually curated table for the standards
  data(exptable)
  ## 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 <-
    sapply(exptable$stdFile,
           function(x)
           files[grep(x,files)])
  
  ## Not run: 
  ## load the settings for the analysis
  data(FEMsettings)
  
  ## 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
}

  

metaMS documentation built on Nov. 8, 2020, 8:21 p.m.