Analyzes spectral data and returns a list of the most intense peak in each spectrum, including the m/z value associated with the peak.

find_max(dat, mass_dat, spectra_cols)

Arguments

dat

The name of the spectral data frame, containing m/z data in the first column and spectral intensity data in subsequent columns.

mass_dat

A character string; the name of the column in dat containing the m/z data for the spectrum.

spectra_cols

A character vector; the names of the column in dat containing the intensity data for the spectra-of-interest.

Value

Returns a data frame indidcating the most intense peaks of each input spectrum. Indicates the spectrum the data is from, the m/z value associated with the peak, and the intensity of the maxima.

References

https://github.com/wesleyburr/subMaldi

Author

Kristen Yeh <kristenyeh@trentu.ca> Wesley Burr <wesleyburr@trentu.ca> Sophie Castel <sophie.castel@ontariotechu.net>

Examples

## Load sample dataset "Master.rda" data("Master") ## Find maxima of four spectra find_max(dat = Master, mass_dat = "full_mz", spectra_cols = c("Blank1", "Before1", "After1", "After2"))
#> Intensity (Max) Mass #> Blank1 58818870554 248.9629 #> Before1 2259690856 255.2331 #> After1 785211555 402.8894 #> After2 1131354678 393.8965