getInjectionPeak: Fit an injection peak to an FIA acquisition.

Description Usage Arguments Value Examples

View source: R/findPeaksFIA.R

Description

Determine an injection peak as an exponential modified gaussian function and a second order exponential corresponding to matrix effect to the most intense signals in an acquisition.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
getInjectionPeak(
  xraw,
  bandlist,
  sec = 2,
  iquant = 0.95,
  gpeak = NULL,
  selIndex = NULL,
  scanmin = 1,
  scanmax = length(xraw@scantime),
  refinement = TRUE,
  graphical = FALSE
)

Arguments

xraw

An xcmsRaw object as returned by xcmsRaw.

bandlist

A list of bands which can be used. Shall stay NULL in general use. bands will be determined automatically.

sec

A tolerance in sec to group the signals.

iquant

The maximum intensity intensity threshold under which the peaks would not be used for peak determination.

gpeak

An approximation of the injection peak, if NULL determining sizepeak.Geom will be used.

selIndex

A seleciton of index to make the regression. We recommend to let it to NULL.

scanmin

The first scan to consider for regression.

scanmax

The last scan to consider for regression.

refinement

Should the starting point of the regression be refined using the selected EICs.

graphical

shald the individually fitted components be plotted.

Value

A vector contaning the injection peak

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
if(require(plasFIA)){
  #Getting the path of a file.
  path_raw <- list.files(system.file(package="plasFIA","mzML"),full.names=TRUE)[2]

  #Opening the file with xcms
  xraw <- xcmsRaw(path_raw)

  #Getting the injection scan
  gp <- determiningInjectionZone(xraw)

  #performing band detection.
  tbands <- findBandsFIA(xraw,ppm = 2,sizeMin = gp[3]-gp[1],beginning=gp[1],end=gp[2])

  #Getting the injection peak
  vpeak <- getInjectionPeak(xraw,bandlist=tbands,gpeak=gp)
  plot(vpeak,type="l")
}

proFIA documentation built on March 20, 2021, 6 p.m.