tsMSdata-class | R Documentation |
This is a class to represent MS data obtained from the sample.
The method as.list
converts every slot (RI
, RT
, and Intensity
)
of a tsMSdata
object into a matrix. The converted matrices
are stored in a list. Each converted matrix has an attribute called 'index' that
relates the metabolite index with the respective rows. The components
of the resulting list are named as the slots. If the slot RT
is
not defined or empty, then the output list will have only two components.
('RT' and 'Intensity').
These objects are created by the functions FindPeaks
and
peakFind
and there is really no need to create them manually,
so the examples focus on simple data manipulations.
The assignment methods retIndex<-
, retTime<-
, and
Intensity<-
are exposed for convenience, though they should not be
needed in general. These objects are tightly coupled to the reference library
(tsLib
) and sample (tsSample
)
objects, so a modification could cause unexpected errors. Use under your own
risk if you know what you are doing.
Objects be created by calling the functions FindPeaks
or
peakFind
. See their respective documentation.
RI
:"list"
, a list containing an RI matrix, one matrix per metabolite
RT
:"list"
, a list containing an RT matrix, one matrix per metabolite
Intensity
:"list"
, a list containing a peak intensity matrix, one matrix per metabolite
signature(obj = "tsMSdata")
: gets the peak intensity list.
signature(obj = "tsMSdata")
: gets the peak intensity list.
signature(obj = "tsMSdata")
: gets RT list.
signature(obj = "tsMSdata")
: sets the RI list.
signature(obj = "tsMSdata")
: gets the RT list.
signature(obj = "tsMSdata")
: sets the RT list.
signature(object = "tsMSdata")
: show function.
signature(object = "tsMSdata")
: coerce a list object. See details
For reasons explained in the details section, the methods retIndex<-
,
retTime<-
, and Intensity<-
are considered deprecated
and could be removed without notice in the feature.
Alvaro Cuadros-Inostroza, Matthew Hannah, Henning Redestig
FindPeaks
, peakFind
showClass("tsMSdata")
# some example manipulations using object peakData
data(TSExample)
peakData
# extract the intensities of the metabolites
int <- Intensity(peakData)
# `int` is a list of matrices where rows are m/z values and columns are samples
head(int)
# extract retention indices (same structure for the intensities)
ri <- retIndex(peakData)
head(ri)
# coerce the whole object into a list of matrices (see details)
data <- as.list(peakData)
# it is possible to use the assignment methods `retIndex<-` and `Intensity<-`
# in these objects, but it is not recommended (only if you know what you are
# doing) for example for small tweaks (not sure what this accomplishes however)
ri[[1]][1,1] <- 234000
retIndex(peakData) <- ri
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.