\name{quantMatrix} \alias{quantMatrix} \title{Create an intensity matrix using quantification masses} \description{ Create an intensity matrix using quantification masses. The quantification masses can be specified when importing the library file or by manually setting its values (see example). } \usage{ quantMatrix(Lib, metabProfile, value = "maxint") } \arguments{ \item{Lib}{A \code{tsLib} object created by \code{\link{ImportLibrary}} function.} \item{metabProfile}{ A \code{tsProfile} object. The final result of the package. This object is generated by either \code{Profile} or \code{ProfileCleanUp}.} \item{value}{The default method to select automatically the quantification mass, in case it is not given by the user. 'maxint' selects the selective mass with the highest intensity. 'maxobs' selects the most observed mass, i.e., the one with less missing values.} } \value{ An intensity matrix with metabolites as rows and samples as columns. The matrix has two attributes: 'quantMass' a numeric vector that contains the quantification masses that were selected; 'isSelMass' a logical vector that indicates whether a quantification mass is also a selected mass. } \examples{ require(TargetSearchData) data(TargetSearchData) # process chormatograms and get a profile RI.path <- file.path(.find.package("TargetSearchData"), "gc-ms-data") RIpath(sampleDescription) <- RI.path refLibrary <- ImportLibrary(file.path(RI.path,"library.txt")) refLibrary <- medianRILib(sampleDescription, refLibrary) corRI <- sampleRI(sampleDescription, refLibrary, r_thres = 0.95) peakData <- peakFind(sampleDescription, refLibrary, corRI) metabProfile <- Profile(sampleDescription, refLibrary, peakData, r_thres = 0.95) # show quant Matrix quantMass(refLibrary) # no quantMass have been defined yet, so are all zeros # 0 0 0 0 0 0 0 0 0 0 0 0 # get a Matrix using use default values, ie, select the masses # with the highest intensity quantMat <- quantMatrix(refLibrary, metabProfile) quantMat # set the quantification Masses quantMass(refLibrary)[1:3] <- c(89,86,100) quantMat <- quantMatrix(refLibrary, metabProfile) quantMat } \author{Alvaro Cuadros-Inostroza, Matthew Hannah, Henning Redestig} \seealso{ \code{\linkS4class{tsLib}}, \code{\linkS4class{tsMSdata}} }