MassDataFrame-class: MassDataFrame: data frame with mass-to-charge ratio metadata

Description Usage Arguments Details Methods Author(s) See Also Examples

Description

An MassDataFrame is an extension of the XDataFrame class with a special slot-column for observed mass-to-charge ratios.

Usage

1
MassDataFrame(mz, ..., row.names = NULL, check.names = TRUE)

Arguments

mz

A numeric vector of mass-to-charge ratios.

...

Named arguments that will become columns of the object.

row.names

Row names to be assigned to the object; no row names are assigned if this is NULL.

check.names

Should the column names be checked for syntactic validity?

Details

MassDataFrame is designed for mass spectrometry data. It includes a slot-column for the mass-to-charge ratio. It is intended to annotate either a single mass spectrum or an experiment where each mass spectrum share the same mass-to-charge ratios. The m/z values can be get and set by the mz(object) accessor, and are assumed to be unique and sorted in increasing order.

Methods

mz(object), mz(object) <- value:

Get or set the mass-to-charge ratio slot-column.

resolution(object), resolution(object) <- value:

Get or set the estimated mass resolution of the mass-to-charge ratios. Typically, this should not be set manually.

isCentroided(object):

Guess whether the data are centroided or not, based on the m/z values.

as.list(x, ..., slots = TRUE):

Coerce the object to a list, where the slot-columns are included by default. Use slots=FALSE to exclude the slot-columns.

Author(s)

Kylie A. Bemis

See Also

XDataFrame

Examples

1
2
3
4
5
6
7
8
## create an MassDataFrame object
mz <- mz(from=200, to=220, by=200)
values <- runif(length(mz))
fdata <- MassDataFrame(mz=mz, values=values)

## check the mass-to-charge ratio properties
head(mz(fdata))
resolution(fdata)

Cardinal documentation built on Nov. 8, 2020, 11:10 p.m.