iwNormGauss: Gaussian normalisation for isolation window efficiency

Description Usage Arguments Value Examples

View source: R/iw-norm.R

Description

Creates a function based on a gaussian curve shape that will normalise any intensity values within a defined isolation window.

The function that is created will output a value between 0 to 1 based on the position between the minOff and maxOff params. (The value 1.0 being equivalent to 100% efficient)

Usage

1
iwNormGauss(sdlim = 3, minOff = -0.5, maxOff = +0.5)

Arguments

sdlim

numerical; Standard deviation limit for gaussian curve

minOff

numerical; Offset to the 'left' for the precursor range. (Should be negative)

maxOff

character; Offset to the 'left' for the precursor range. (Should be positive)

Value

normalisation function for selected range.

Examples

1
2
3
4
5
6
7
8
9
iwNormFun <- iwNormGauss(minOff=-0.5, maxOff=0.5)
pm <- data.frame(mz=c(99.5, 99.9, 100, 100.1, 100.5),i=c(1000, 1000, 1000, 1000, 1000))
mzmax = 100.5
mzmin = 99.5
middle <- mzmax-(mzmax-mzmin)/2
adjustmz = pm$mz-middle

# normalise the intensities
pm$normi = pm$i*iwNormFun(adjustmz)

msPurity documentation built on Jan. 14, 2021, 2:44 a.m.