PeakList: Detection and quantification of peaks on a sum spectrum.

PeakListR Documentation

Detection and quantification of peaks on a sum spectrum.

Description

Detection and quantification of peaks on a sum spectrum.

Usage

PeakList(
  raw,
  mzNominal = unique(round(getRawInfo(raw)$mz)),
  ppm = 130,
  resolutionRange = c(3000, 5000, 8000),
  minIntensity = 5,
  fctFit = c("sech2", "averagePeak")[1],
  peakShape = NULL,
  maxIter = 1,
  R2min = 0.995,
  autocorNoiseMax = 0.3,
  plotFinal = FALSE,
  plotAll = FALSE,
  thNoiseRate = 1.1,
  minIntensityRate = 0.01,
  countFacFWHM = 10,
  daSeparation = 0.005,
  d = 3,
  windowSize = 0.4
)

## S4 method for signature 'ptrRaw'
PeakList(
  raw,
  mzNominal = unique(round(getRawInfo(raw)$mz)),
  ppm = 130,
  resolutionRange = c(300, 5000, 8000),
  minIntensity = 5,
  fctFit = c("sech2", "averagePeak")[1],
  peakShape = NULL,
  maxIter = 3,
  R2min = 0.995,
  autocorNoiseMax = 0.3,
  plotFinal = FALSE,
  plotAll = FALSE,
  thNoiseRate = 1.1,
  minIntensityRate = 0.01,
  countFacFWHM = 10,
  daSeparation = 0.005,
  d = 3,
  windowSize = 0.4
)

Arguments

raw

ptrRaw-class object

mzNominal

the vector of nominal mass where peaks will be detected

ppm

the minimum distance between two peeks in ppm

resolutionRange

vector with resolution min, resolution Mean, and resolution max of the PTR

minIntensity

the minimum intenisty for peaks detection. The final threshold for peak detection will be : max ( minPeakDetect , thresholdNoise ). The thresholdNoise correspond to max(thNoiseRate * max( noise around the nominal mass), minIntensityRate * max( intenisty in the nominal mass). The noise around the nominal mass correspond : [m-windowSize-0.2,m-windowSize]U[m+windowSize,m+WindowSize+0.2].

fctFit

the function for the quantification of Peak, should be average or Sech2

peakShape

a list with reference axis and a reference peak shape centered in zero

maxIter

maximum iteration of residual analysis

R2min

R2 minimum to stop the iterative residual analysis

autocorNoiseMax

the autocorelation threshold for Optimal windows Savitzky Golay filter in OptimalWindowSG ptairMS function. See ?OptimalWindowSG

plotFinal

boolean. If TRUE, plot the spectrum for all nominal masses, with the final fitted peaks

plotAll

boolean. Tf TRUE, plot all step to get the final fitted peaks

thNoiseRate

The rate which multiplies the max noise intensity

minIntensityRate

The rate which multiplies the max signal intensity

countFacFWHM

integer. We will sum the fitted peaks on a window's size of countFacFWHM * FWHM, centered in the mass peak center.

daSeparation

the minimum distance between two peeks in Da for nominal mass < 17.

d

the degree for the Savitzky Golay filtrer

windowSize

peaks will be detected only around m - windowSize ; m + windowSize, for all m in mzNominal

Value

a list containing:

  • peak: a data.frame, with for all peak detected: the mass center, the intensity count in cps, the peak width (delta_mz), correspond to the Full Width Half Maximum (FWHM),the resolution m/delta_m, the other parameters values estimated of fitFunc.

  • warnings: warnings generated by the peak detection algorithm per nominal masses

  • infoPlot: elements needed to plot the fitted peak per nominal masses

Examples

library(ptairData)
filePath <- system.file('extdata/exhaledAir/ind1', 'ind1-1.h5', 
package = 'ptairData')
file <- readRaw(filePath)

peakList <- PeakList(file, mzNominal = c(21,63))
peakList$peak

camilleroquencourt/ptairMS documentation built on June 9, 2024, 10:35 a.m.