summarySpectra {MALDIrppa}R Documentation

Summary of mass spectra

Description

This function generates a numerical summary of a collection of MassSpectrum objects.

Usage

summarySpectra(x, digits = 4)

Arguments

x

A list of MassSpectrum objects.

digits

Integer indicating the number of decimal places to be used.

Details

For each MassSpectrum on the list this function provides summary statistics of m/z points and signal intensities (number, minimum, mean, standard deviation, median, mean absolute deviation, maximum).

Value

A data.frame containing summary information of a collection of MassSpectrum objects.

Examples

# Load example data

data(spectra) # list of MassSpectra class objects
data(type)    # metadata

# Summary of spectra features (results for 20 first mass spectra)

summarySpectra(spectra[1:20])

# Some pre-processing

sc.results <- screenSpectra(spectra, meta = type)

spectra <- sc.results$fspectra
type <- sc.results$fmeta

spectra <- transformIntensity(spectra, method = "sqrt")
spectra <- wavSmoothing(spectra)
spectra <- removeBaseline(spectra)

names(spectra) <- type$SpectID # spectra IDs are lost with removeBaseline()

# Summary of spectra features (results for positions 10 to 20)

summarySpectra(spectra[10:20])

[Package MALDIrppa version 1.1.0-2 Index]