CMSproc-class: A class to hold chromatography-mass spectrometry...

Description Slots Utility functions Accessors Examples

Description

This class builds on the CMSraw class to additionally store background-corrected intensities as well as the bivariate kernel density estimate.

Slots

colData:

a DataFrame of phenotype and sample information.

rawDT:

a data.table of raw spectral information.

mzParams:

a list containing the minimum and maximum M/Z value and number of scans in each sample.

rtAlign:

a logical indicating whether the data has been retention time aligned or not.

bgcorrDT:

a data.table of background-corrected spectral information.

density:

a matrix with rows corresponding to M/Z values and columns corresponding to scans containing the kernel density estimate.

densityQuantiles:

a numeric vector containing the 100 percent quantiles of the nonzero density values.

Utility functions

We have the following utility functions:

show:

The show method; prints the object.

getEICS:

Gets extracted ion chromatograms (EICs) for the supplied M/Z ranges.

plotDensityRegion:

Makes an image plot of the density estimate in a specified M/Z and scan region.

Accessors

We have the following accessor functions:

colData:

Gets the DataFrame containing phenotype and sample information.

densityEstimate:

Gets the matrix containing the density estimate.

densityQuantiles:

Gets the quantiles of the nonzero values in the density estimate.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Construct a completely fake example
densmat <- matrix(rnorm(600), nrow = 20, ncol = 30)
colnames(densmat) <- 1:ncol(densmat)
rownames(densmat) <- seq(350, by = 0.005, length.out = nrow(densmat))
cmsobj <- new("CMSproc", density = densmat)
head(densityEstimate(cmsobj))

## Takes about 20s to run
## Not run: 

data(cmsRawExample)
cmsProc <- bakedpi(cmsRawExample,
                    dbandwidth = c(0.01, 10), dgridstep = c(0.01, 1),
                    dortalign = TRUE, mzsubset = c(500,510))
cmsProc

## End(Not run)

yamss documentation built on Nov. 8, 2020, 6:57 p.m.