Called internally by normSpectra. Evaluates the sum of all intensities (TIC) of each spectrum in a dataset. If the TIC of all spectra are not equal, their intensities are multiplied by a normalization factor. Capable of normalizing 2-6 spectra at once.

norm_TIC(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 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.

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 TIC of "Before1" and "Before2" ex <- normSpectra(dat = Master2, mass_dat = "full_mz", method = "TIC", spectra_cols = c("Before1", "Before2"))