Class xcmsSet, a class for preprocessing peak data
xcmsSet-class.Rd
This class transforms a set of peaks from multiple LC/MS or GC/MS samples into a matrix of preprocessed data. It groups the peaks and does nonlinear retention time correction without internal standards. It fills in missing peak values from raw data. Lastly, it generates extracted ion chromatograms for ions of interest.
Objects from the Class
Objects can be created with the xcmsSet
constructor
which gathers peaks from a set NetCDF files. Objects can also be
created by calls of the form new("xcmsSet", ...)
.
Slots
- peaks
matrix
containing peak data.- filled
A vector with peak indices of peaks which have been added by a
fillPeaks
method.- groups
Matrix containing statistics about peak groups.
- groupidx
List containing indices of peaks in each group.
- phenoData
A
data.frame
containing the experimental design factors.- rt
list
containing two lists,raw
andcorrected
, each containing retention times for every scan of every sample.- filepaths
Character vector with absolute path name of each NetCDF file.
- profinfo
list
containing the valuesmethod
- profile generation method, andstep
- profile m/z step size and eventual additional parameters to the profile function.- dataCorrection
logical
vector filled if the waters Lock mass correction parameter is used.- polarity
A string ("positive" or "negative" or NULL) describing whether only positive or negative scans have been used reading the raw data.
- progressInfo
Progress informations for some xcms functions (for GUI).
- progressCallback
Function to be called, when progressInfo changes (for GUI).
- mslevel
Numeric representing the MS level on which the peak picking was performed (by default on MS1). This slot should be accessed through its getter method
mslevel
.- scanrange
Numeric of length 2 specifying the scan range (or
NULL
for the full range). This slot should be accessed through its getter methodscanrange
. The scan range provided in this slot represents the scans to which the whole raw data is subsetted.- .processHistory
Internal slot to be used to keep track of performed processing steps. This slot should not be directly accessed by the user.
Methods
- c
signature("xcmsSet")
: combine objects together- filepaths<-
signature(object = "xcmsSet")
: setfilepaths
slot- filepaths
signature(object = "xcmsSet")
: getfilepaths
slot- diffreport
signature(object = "xcmsSet")
: create report of differentially regulated ions including EICs- fillPeaks
signature(object = "xcmsSet")
: fill in peak data for groups with missing peaks- getEIC
signature(object = "xcmsSet")
: get list of EICs for each sample in the set- getXcmsRaw
signature(object = "xcmsSet", sampleidx = 1, profmethod = profMethod(object), profstep = profStep(object), profparam=profinfo(object), mslevel = NULL, scanrange = NULL, rt=c("corrected", "raw"), BPPARAM = bpparam())
: read the raw data for one or more files in thexcmsSet
and return it. The default parameters will apply all settings used in the originalxcmsSet
call to generate thexcmsSet
object to be applied also to the raw data. Parametersampleidx
allows to specify which raw file(s) should be loaded. ArgumentBPPARAM
allows to setup parallel processing.- groupidx<-
signature(object = "xcmsSet")
: setgroupidx
slot- groupidx
signature(object = "xcmsSet")
: getgroupidx
slot- groupnames
signature(object = "xcmsSet")
: get textual names for peak groups- groups<-
signature(object = "xcmsSet")
: setgroups
slot- groups
signature(object = "xcmsSet")
: getgroups
slot- groupval
signature(object = "xcmsSet")
: get matrix of values from peak data with a row for each peak group- group
signature(object = "xcmsSet")
: find groups of peaks across samples that share similar m/z and retention times- mslevel
Getter method for the
mslevel
slot.- peaks<-
signature(object = "xcmsSet")
: setpeaks
slot- peaks
signature(object = "xcmsSet")
: getpeaks
slot- plotrt
signature(object = "xcmsSet")
: plot retention time deviation profiles- profinfo<-
signature(object = "xcmsSet")
: setprofinfo
slot- profinfo
signature(object = "xcmsSet")
: getprofinfo
slot- profMethod
signature(object = "xcmsSet")
: extract the method used to generate the profile matrix.- profStep
signature(object = "xcmsSet")
: extract the profile step used for the generation of the profile matrix.- retcor
signature(object = "xcmsSet")
: use initial grouping of peaks to do nonlinear loess retention time correction- sampclass<-
signature(object = "xcmsSet")
: Replaces the column “class” in thephenoData
slot. See details for more information.- sampclass
signature(object = "xcmsSet")
: Returns the content of the column “class” from thephenoData
slot or, if not present, the interaction of the experimental design factors (i.e. of thephenoData
data.frame
). See details for more information.- phenoData<-
signature(object = "xcmsSet")
: set thephenoData
slot- phenoData
signature(object = "xcmsSet")
: get thephenoData
slot- progressCallback<-
signature(object = "xcmsSet")
: set theprogressCallback
slot- progressCallback
signature(object = "xcmsSet")
: get theprogressCallback
slot- scanrange
Getter method for the
scanrange
slot. See scanrange slot description above for more details.- sampnames<-
signature(object = "xcmsSet")
: set rownames in thephenoData
slot- sampnames
signature(object = "xcmsSet")
: get rownames in thephenoData
slot- split
signature("xcmsSet")
: divide the xcmsSet into a list of xcmsSet objects depending on the provided factor. Note that only peak data will be preserved, i.e. eventual peak grouping information will be lost.object$name
,object$name<-value
Access and set
name
column inphenoData
object[, i]
Conducts subsetting of a
xcmsSet
instance. Only subsetting on columns, i.e. samples, is supported. Subsetting is performed on all slots, also ongroups
andgroupidx
. Parameteri
can be an integer vector, a logical vector or a character vector of sample names (matchingsampnames
).
Details
The phenoData
slot (and phenoData
parameter in the
xcmsSet
function) is intended to contain a data.frame
describing
all experimental factors, i.e. the samples along with their
properties. If this data.frame
contains a column named
“class”, this will be returned by the sampclass
method
and will thus be used by all methods to determine the sample
grouping/class assignment (e.g. to define the colors in various plots
or for the group
method).
The sampclass<-
method adds or replaces the “class”
column in the phenoData
slot. If a data.frame
is
submitted to this method, the interaction of its columns will be
stored into the “class” column.
Also, similar to other classes in Bioconductor, the $
method
can be used to directly access all columns in the phenoData
slot (e.g. use xset$name
on a xcmsSet
object called
“xset” to extract the values from a column named “name” in the phenoData
slot).
Author
Colin A. Smith, csmith@scripps.edu, Johannes Rainer johannes.rainer@eurac.edu