normMethod_stdev: Normalize Spectrum to Standard Deviation of Noise

Description Usage Arguments Value Author(s) References See Also Examples

Description

Called internally by normSpectra().Evaluates the standard deviation of intensity values within the same noisy region (a region lacking peaks) of each spectrum. All intensities in each spectrum are then divided by the spectrum's standard deviation in the noise region. All output spectra should have a standard deviation of 1 in the selected region. Capable of normalizing 1-6 spectra at once.

Usage

1
2
norm_stdev(dat, mass_dat, lower = 900, upper= 1100 , 
                  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.

lower

Single numeric value; the lower m/z bound of the noisy region in all spectra.

upper

Single numeric value; the lower m/z bound of the noisy region in all spectra.

spectra_cols

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

Value

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

Author(s)

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

References

https://github.com/wesleybur/subMaldi

See Also

codenormSpectra

Examples

1
2
3
4
5
6
7
## Load sample dataset "Master.rda"
data("Master")

## Normalize spectra "After1" and "After2" 
# using the noisy region from m/z 900 to 1100
ex <- normSpectra(Master, mass_dat = "full_mz", method = "stdev",
            lower = 900, upper = 1100, spectra_cols = c("After1", "After2"))

wesleyburr/subMaldi documentation built on Oct. 1, 2021, 7:07 a.m.