BiocStyle::markdown()

Introduction

MSExample is a simple example package for mass spectrometry (MS).

It implements some basic classes and methods for working with raw MS data, including:

It is not intended for actual use, but rather as an example of Bioconductor package development for the Advanced R session of the May Institute Computation and Statistics for mass spectrometry and proteomics short course at Northeastern University

Simulating spectra

We can use the simSpectra to simulate a mass spectrum.

library(MSExample)

set.seed(2019)
s1 <- simSpectra(baseline=4)

Mass spectra are represented as MassSpectrum objects.

s1

Plotting spectra

Use plot() to plot a MassSpectrum.

plot(s1)

Spectral processing

Several processing options are provided.

Smoothing

Use smoothNoise() to smooth a MassSpectrum.

s2 <- smoothNoise(s1)

plot(s2)

Baseline correction

Use removeBaseline() to baseline correct a MassSpectrum.

s3 <- removeBaseline(s2)

plot(s3)

Peak detection

Use findPeaks() to detect peaks in a MassSpectrum.

s4 <- findPeaks(s3)

plot(s4)

Bin peaks

Use binPeaks() to bin a MassSpectrum to detected peaks.

s5 <- binPeaks(s4)

plot(s5)

Session information

sessionInfo()


kuwisdelu/MSExample documentation built on May 13, 2020, 10:25 p.m.