normMethod_custom.Rd
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)
dat | The name of the spectral data frame, containing |
---|---|
mass_dat | A character string; the name of the column in |
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 |
spectra_cols | A character string; the names of the column in |
showHI | A Boolean variable; clipping argument for results greater than 1 after normalization. |
Returns a new data frame including the original m/z data and normalized intensity data.
https://github.com/wesleyburr/subMaldi
Kristen Yeh <kristenyeh@trentu.ca> Wesley Burr <wesleyburr@trentu.ca>
## 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"))