spectrometer: Class Representing a Mass Spectrometer

Description Usage Arguments S3 METHODS References See Also Examples

Description

Class slots:

setting

an object of class setting.

calibrator

an object of class calibrator.

Usage

1
2
3
4
5
spectrometer(dist.drift=1, dist.focus=17, dist.accel=8,
    volt.accel=20000, volt.focus=2000,
    time.delay=600, time.resol=4e-9,
    vel0.mean=350, vel0.std=50,
    time.mean=numeric(0), model=structure(NULL, class="lm"), error.rel=numeric(0))

Arguments

dist.accel

A numeric scalar denoting the distance from sample plate to first grid in millimeters.

dist.drift

A numeric scalar denoting the length of drift tube in meters.

dist.focus

A numeric scalar denoting the distance between charged grids in millimeters.

error.rel

A numeric vector denoting the relative calibration error for the calibrants.

model

An object of class lm.

time.delay

A numeric scalar denoting the delay time before focus voltage is applied in nanoseconds.

time.mean

A numeric scalar denoting the mean time-of-flight of the calibrants.

time.resol

A numeric scalar denoting the time between detector records in seconds.

vel0.mean

A numeric scalar denoting the mean initial velocity in meters/second.

vel0.std

A numeric scalar denoting the standard deviation of initial velocity.

volt.accel

A numeric scalar denoting the voltage between charged grids in volts.

volt.focus

A numeric scalar denoting the voltage used in ion focusing phase in volts.

S3 METHODS

run

Run a mass spectrometer.

Usage: run(simObj, proObj, isotope)

simObj

a spectrometer object.

proObj

a proteins object or a calibrants object. If proObj is a calibrants object, then a calibration run is performed and a calibrated spectrometer object is returned. If proObj is a proteins object, then a real run is performed and a spectrum object is returned. If the spectrometer object has been calibrated, the returned spectrum will have values for both mz slot and tof slot. Otherwise, the returned spectrum will have values only for tof slot.

isotope

a logical value indicating if isotope distribution should be simulated.

References

Coombes, K.R., Koomen, J.M., Baggerly, K.A., Morris, J.S., Kobayashi, R., “Understanding the characteristics of mass spectrometry data through the use of simulation," Cancer Informatics, 2005(1):41–52, 2005.

See Also

setting, calibrator, spectrum, ion.focus.delay.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## run a uncalibrated mass spectrometer 
sam <- proteins(masses=c(1, 95, 190), counts=as.integer(c(500, 3000, 10000)))
sim <- spectrometer(vel0.mean=350, vel0.std=75, time.resol=4e-9)
x <- run(sim, sam)
plot(x)

## run a calibrated mass spectrometer 
cal <- calibrants(masses=c(1000, 2000, 5000, 10000, 20000), counts=as.integer(rep(1000, 5)))
sim.cal <- run(sim, cal)
y <- run(sim.cal, sam)
plot(y)

zeehio/msProcess documentation built on May 4, 2019, 10:15 p.m.