tsRim-class: Class for representing retention index markers

tsRim-classR Documentation

Class for representing retention index markers

Description

This is a class to represent retention index markers.

Objects from the Class

Objects can be created by the function ImportFameSettings or by calls of the form new("tsRim", limits = [two column matrix with time limits], standard = [a vector with RI standards], mass = [m/z marker]).

Slots

limits:

"matrix", two column matrix with lower and upper limits where the standards will be search. One row per standard.

standard:

"numeric", the marker RI values.

mass:

"numeric", the m/z marker.

Methods

[

signature(x = "tsRim"): Selects a subset of markers.

rimLimits

signature(obj = "tsRim"): gets the time limits.

rimLimits<-

signature(obj = "tsRim"): sets the time limits.

rimMass

signature(obj = "tsRim"): gets the m/z marker.

rimMass<-

signature(obj = "tsRim"): sets the m/z marker.

rimStandard

signature(obj = "tsRim"): gets the standards.

rimStandard<-

signature(obj = "tsRim"): sets the standards.

length

Returns the number of retention index standards.

c

Function to combine multiple objects.

Author(s)

Alvaro Cuadros-Inostroza, Matthew Hannah, Henning Redestig

See Also

ImportFameSettings

Examples

showClass("tsRim")

# create a rimLimit object:
#  - set the lower (first column) and upper (second column) time limites to
#    search for standards.
Lim <- rbind(c(200, 300), c(400,450), c(600,650))
#  - set the retention indices of the standard
Std <- c(250000, 420000, 630000)
#  - set the mass marker
mass <- 87
#  - create the object
rimLimits <- new("tsRim", limits = Lim, standard = Std, mass = mass)
#  - get the number of standards using `length`
length(rimLimits)

# sometimes you need to change the limits of a particular standard
rimLimits(rimLimits)[2,] <- c(410, 450)

# to change the mass value
rimMass(rimLimits) <- 85

# to select a subset
rim <- rimLimits[1:2]

# remove a marker (number 3 in this case)
rim <- rimLimits[-3]

# objects can be combined using the `c` method
obj <- new("tsRim", limits = cbind(100 * 1:6, 100 * 1:6 + 20),
           standard = 1000 * 1:6, mass = 100) # a random object
# combine objects
obj <- c(rimLimits, obj)

acinostroza/TargetSearch documentation built on June 14, 2024, 8:03 a.m.