imputeMat: Impute missing values on an matrix set from an ptrSet

View source: R/alignment.R

imputeMatR Documentation

Impute missing values on an matrix set from an ptrSet

Description

Imputing missing values by returning back to the raw data and fitting the peak shape function on the noise / residuals

Usage

imputeMat(X, ptrSet, quantiUnit)

Arguments

X

the peak table matrix with missing values

ptrSet

processed by detectPeak function

quantiUnit

the unit of the quantities in the matrix X (ppb, cps or ncps)

Value

the same matrix as in input, with missing values imputing

Examples

library(ptairData)
dirRaw <- system.file("extdata/exhaledAir", package = "ptairData")
exhaledPtrset <- createPtrSet(dir=dirRaw, 
setName="exhaledPtrset", mzCalibRef = c(21.022, 60.0525),
fracMaxTIC = 0.7, saveDir = NULL )
exhaledPtrset<-detectPeak(exhaledPtrset,mz=c(21,52))
eSet <- alignSamples(exhaledPtrset,pValGreaterThres=0.05,fracGroup=0)
X <-Biobase::exprs(eSet)
X <- imputeMat(X,exhaledPtrset,quantiUnit='ppb')
plotFeatures(exhaledPtrset,mz = 52.047,typePlot = "ggplot",colorBy = "subfolder")

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