CMSslice-class: A class to hold chromatography-mass spectrometry peak bounds...

Description Utility functions Accessors Examples

Description

This class is based on the SummarizedExperiment class. It holds information on peak quantifications, M/Z and scan bounds, sample information, and preprocessing metadata. Objects of the class can be constructed using CMSslice.

Utility functions

We have the following utility functions:

show:

The show method; prints the object.

Accessors

We have the following accessor functions:

colData:

Gets the DataFrame containing phenotype and sample information.

densityCutoff:

Gets the value used to threshold the density for peak calling.

densityQuantiles:

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

peakBounds:

Gets the DataFrame of M/Z bounds, scan bounds, and ID numbers for detected peaks.

peakQuants:

Gets the matrix of peak quantifications (rows: peaks, columns: samples).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Construct a fake class
quants <- matrix(rnorm(12*5000), nrow = 5000, ncol = 12)
bounds <- cbind(mzmin = seq(from = 100, to = 1100, length.out = 5000),
                mzmax = seq(from = 100, to = 1100, length.out = 5000) + 0.1,
                scan.min = rep(10,5000), scan.max = rep(20, 5000),
                peaknum = 1:5000)
cmsobj <- CMSslice(assays = SimpleList(peakQuants = quants),
                   rowData = DataFrame(bounds))
head(peakQuants(cmsobj))

## A better example which takes 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))
cutoff <- densityQuantiles(cmsProc)["99.9
sliced <- slicepi(cmsProc, cutoff = cutoff, verbose = TRUE)
sliced

## End(Not run)

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