AbstractMassObject-class: Class "AbstractMassObject"

AbstractMassObject-classR Documentation

Class "AbstractMassObject"

Description

AbstractMassObject is an abstract (means pure virtual) class. It is the parent class of MassSpectrum and MassPeaks. It shouldn't create or handle by the user because it is for internal use only.

Derived classes

MassPeaks, MassSpectrum

Slots

mass:

numeric, mass or mass-to-charge ratio

intensity:

numeric, intensities for measured mass-to-charge ratios

metaData:

list, some metadata to describe the spectrum

Methods

[

signature(x = "AbstractMassObject", i = "numeric"): Extracts a range of an AbstractMassObject object and returns a new one.

as.matrix

signature(x = "AbstractMassObject"): Converts an AbstractMassObject object to a matrix with 2 columns (mass, intensity).

coordinates

signature(object = "AbstractMassObject"): Accessor function for coordinates stored in object generated from imaging mass spectrometry data.

coordinates<-

signature(object = "AbstractMassObject", value = "numeric|matrix") Replacement function for coordinates used in imaging mass spectrometry datasets.

intensity

signature(object = "AbstractMassObject"): Accessor function for slot intensity.

intensity<-

signature(object = "AbstractMassObject", value = "numeric") Replacement function for slot intensity.

isEmpty

signature(object = "AbstractMassObject"): Returns TRUE if length of intensity is 0 or all intensity values are 0.

length

signature(x = "AbstractMassObject"): Returns length of slot intensity.

lines

signature(x = "AbstractMassObject"): Extented function for adding AbstractMassObject object as a line to a specific plot. See lines for details.

mass

signature(object = "AbstractMassObject"): Accessor function for slot mass.

mass<-

signature(object = "AbstractMassObject", value = "numeric") Replacement function for slot mass.

mz

signature(object = "AbstractMassObject"): Accessor function for slot mass.

mz<-

signature(object = "AbstractMassObject", value = "numeric") Replacement function for slot mass.

metaData

signature(object = "AbstractMassObject"): Accessor function for slot metaData.

metaData<-

signature(object = "AbstractMassObject"): Replacement function for slot metaData.

plot

signature(x = "AbstractMassObject", y = "missing"): Extented function for plotting an AbstractMassObject object. See plot,AbstractMassObject,missing-method for details.

points

signature(x = "AbstractMassObject"): Extented function for adding AbstractMassObject object as points to a specific plot. See points for details.

trim

signature(object = "AbstractMassObject", range = "numeric"): Trim an AbstractMassObject object. See trim,AbstractMassObject,numeric-method for details.

transformIntensity

signature(object = "AbstractMassObject"): Transforms the intensities of an AbstractMassObject object. See transformIntensity,AbstractMassObject-method for details.

Author(s)

Sebastian Gibb mail@sebastiangibb.de

See Also

MassPeaks, MassSpectrum, plot,AbstractMassObject,missing-method, transformIntensity,AbstractMassObject-method, trim,AbstractMassObject,numeric-method

Website: https://strimmerlab.github.io/software/maldiquant/

Examples

## load package
library("MALDIquant")

## create example spectrum
s <- createMassSpectrum(mass=1:10, intensity=11:20,
                        metaData=list(name="Example Spectrum"))

## get intensity
intensity(s)

## get mass
mass(s)

## get metaData
metaData(s)

## replace metaData
metaData(s) <- list(name="Spectrum")

## trim spectrum
trim(s, c(2, 9))

## select a range
s[3:6]

MALDIquant documentation built on Sept. 11, 2024, 6:15 p.m.