quantMatrix | R Documentation |
Create an intensity matrix using quantification masses. The quantification masses can be specified when importing the library file or automatically.
quantMatrix(Lib, metabProfile, value=c("quantmass", "maxint", "maxobs"), selmass=FALSE)
Lib |
A |
metabProfile |
A |
value |
The method to select automatically the quantification mass. The options are: “maxint” which selects the selective mass with the highest median intensity across all samples; “maxobs” which selects the mass which the most observations (the one with fewer missing values; or “quantmass” which uses the selected quantification mass defined by the library |
selmass |
Logical. If |
An intensity matrix with metabolites as rows and samples as columns. The column
names are the sample names of the respective tsSample
object and the rownames
correspond with the library unique identifiers.
In addition, the matrix has these attributes:
“quantMass” is a numeric vector that contains the quantification masses that was selected.
“isSelMass” is a logical vector that indicates whether the quantification mass is also a selected mass.
“isCorMass” to indicate that the mass is one of the correlating masses.
“libNames” the metabolite names (a character vector).
Alvaro Cuadros-Inostroza
tsLib
, tsMSdata
require(TargetSearchData)
data(TSExample)
# process chromatograms and get a profile
RI.path <- tsd_data_path()
RIpath(sampleDescription) <- RI.path
refLibrary <- ImportLibrary(tsd_file_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)
# get a Matrix using use default values, ie, use the quantification masses
# defined in the library
quantMat <- quantMatrix(refLibrary, metabProfile)
quantMat
# use 'maxint' to select the metabolites with the highest median intensity
quantMat <- quantMatrix(refLibrary, metabProfile, 'maxint')
# use 'maxobs' to select the metabolites with the most observed values
quantMat <- quantMatrix(refLibrary, metabProfile, 'maxobs')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.