Called internally by normSpectra. Normalizes the intensity data of each input spectrum to the intensity of the selected m/z peak. Capable of normalizing 6 spectra to the same m/z value at once.

norm_custom(dat, mass_dat, norm_mz, spectra_cols, showHI = FALSE)

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.

norm_mz

Numeric; the m/z peak to which the spectral intensity should be normalized to. Value should have the same number of decimal places as the m/z data in dat.

spectra_cols

A character string; the names of the column in dat containing the intensity data for the spectrs to be analyzed.

showHI

A Boolean variable; clipping argument for results greater than 1 after normalization.

Value

Returns a new data frame including the original m/z data and normalized intensity data.

References

https://github.com/wesleyburr/subMaldi

Author

Kristen Yeh <kristenyeh@trentu.ca> Wesley Burr <wesleyburr@trentu.ca>

See also

Examples

## Load sample dataset "Master2.rda" data("Master2") ## Normalize the intensity of peaks in "Before1" to the intensity of the peak at 255.23 ex <- normSpectra(dat = Master2, mass_dat = "full_mz", method = "custom", norm_mz = 255.23, spectra_cols = "Before1") ## Normalize the intensity of peaks in 6 spectra to the intensity of the peak at 255.23 ex <- normSpectra(dat = Master2, mass_dat = "full_mz", method = "custom", norm_mz = 255.23, spectra_cols = c("Blank1", "Blank2", "Before1", "Before2", "After1", "After2"))