
Class xcmsSet, a class for preprocessing peak data
xcmsSet-class.RdThis 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
matrixcontaining peak data.- filled
A vector with peak indices of peaks which have been added by a
fillPeaksmethod.- groups
Matrix containing statistics about peak groups.
- groupidx
List containing indices of peaks in each group.
- phenoData
A
data.framecontaining the experimental design factors.- rt
listcontaining two lists,rawandcorrected, each containing retention times for every scan of every sample.- filepaths
Character vector with absolute path name of each NetCDF file.
- profinfo
listcontaining the valuesmethod- profile generation method, andstep- profile m/z step size and eventual additional parameters to the profile function.- dataCorrection
logicalvector 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
NULLfor 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"): setfilepathsslot- filepaths
signature(object = "xcmsSet"): getfilepathsslot- 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 thexcmsSetand return it. The default parameters will apply all settings used in the originalxcmsSetcall to generate thexcmsSetobject to be applied also to the raw data. Parametersampleidxallows to specify which raw file(s) should be loaded. ArgumentBPPARAMallows to setup parallel processing.- groupidx<-
signature(object = "xcmsSet"): setgroupidxslot- groupidx
signature(object = "xcmsSet"): getgroupidxslot- groupnames
signature(object = "xcmsSet"): get textual names for peak groups- groups<-
signature(object = "xcmsSet"): setgroupsslot- groups
signature(object = "xcmsSet"): getgroupsslot- 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
mslevelslot.- peaks<-
signature(object = "xcmsSet"): setpeaksslot- peaks
signature(object = "xcmsSet"): getpeaksslot- plotrt
signature(object = "xcmsSet"): plot retention time deviation profiles- profinfo<-
signature(object = "xcmsSet"): setprofinfoslot- profinfo
signature(object = "xcmsSet"): getprofinfoslot- 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 thephenoDataslot. See details for more information.- sampclass
signature(object = "xcmsSet"): Returns the content of the column “class” from thephenoDataslot or, if not present, the interaction of the experimental design factors (i.e. of thephenoDatadata.frame). See details for more information.- phenoData<-
signature(object = "xcmsSet"): set thephenoDataslot- phenoData
signature(object = "xcmsSet"): get thephenoDataslot- progressCallback<-
signature(object = "xcmsSet"): set theprogressCallbackslot- progressCallback
signature(object = "xcmsSet"): get theprogressCallbackslot- scanrange
Getter method for the
scanrangeslot. See scanrange slot description above for more details.- sampnames<-
signature(object = "xcmsSet"): set rownames in thephenoDataslot- sampnames
signature(object = "xcmsSet"): get rownames in thephenoDataslot- 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<-valueAccess and set
namecolumn inphenoDataobject[, i]Conducts subsetting of a
xcmsSetinstance. Only subsetting on columns, i.e. samples, is supported. Subsetting is performed on all slots, also ongroupsandgroupidx. Parameterican 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