MassSpectra: Class 'MassSpectra'

Description Usage Arguments Details Value Slots Author(s) Examples

View source: R/MassSpectra.R

Description

Class MassSpectra is the main data container in the tofsims package as it contains the individual mass spectra.

MassSpectra is also the call to class constructor. It is used for importing high-resolution mass spectra from raw data.

Usage

1
2
3
MassSpectra(select = c("ulvacraw", "iontofgrd", "dummy"), analysisName, ...)

MassSpectra(select = c("ulvacraw", "iontofgrd", "dummy"), analysisName, ...)

Arguments

select

character, 'ulvacraw', 'iontofgrd', 'dummy'

analysisName

character, the (file)name of the dataset

...

additional args

Details

Class MassSpectra is the main data container of the tofsims package, containing the individual mass spectra in the slot nz. Additional metadata about the analysis can be found in the slots analysisName and instrument. Values for slope and intercept of the linear mass calibration equation are stored in the slot calibration. The M/z values can be found in mz. calibration allows calculating from M/z values back to times-of-flight. The slot calibPoints is used to recalibrate the dataset. It contains a data.frame with the columns mz and TOF. The slot analysis of type list, is used as a container for data analysis objects. Typically, object of the class MassSpectra are constructed during data import using the user constructor function with the same name as the class, MassSpectra.

MassSpectra is also the call to class constructor. It is used for importing high-resolution mass spectra from raw data.

Value

object of class MassSpectra

Slots

analysisName

character vector with the import filename

instrument

character vector type of instrument used in the experiment

calibration

data frame for numerics slope and intercept of the mass calibration

calibPoints

data frame for time of flight to maass to charge calibration

nz

matrix with rows of ion counts and columns as toftimes or mass to charge ratios

mz

vector same length as columns in nz for mass to charge values

Author(s)

Lorenz Gerber <lorenz.gerber@slu.se>

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
## access rawdata in tofsims package
library(tofsimsData)
importFile<-system.file("rawdata", "trift_test_001.RAW", package = "tofsimsData")
MassSpectra('ulvacraw', importFile)

## End(Not run)
## create dummy MassSpectra object
MassSpectra('dummy')

tofsims documentation built on Nov. 8, 2020, 5:10 p.m.