baselineCorrection {ASICS}R Documentation

Baseline correction

Description

Apply a baseline correction to a spectra with the algorithm described in Wang et al. (2013).

Usage

baselineCorrection(spectra, ncores = 1)

Arguments

spectra

Data frame with spectra in columns and chemical shifts in rows. Colnames of this data frame correspond to pure metabolite names and rownames to chemical shift grid (in ppm).

ncores

Number of cores used in parallel evaluation. Default to 1.

Value

A data frame with baseline corrected spectra in columns and chemical shifts (in ppm) in rows.

References

Wang, K.C., Wang, S.Y., Kuo, C.H., Tseng Y.J. (2013). Distribution-based classification method for baseline correction of metabolomic 1D proton nuclear magnetic resonance spectra. Analytical Chemistry, 85(2), 1231-1239.

Examples

current_path <- file.path(system.file("extdata", package = "ASICS"),
                          "spectra_example.txt")
spectra_data <- read.table(current_path, header = TRUE, row.names = 1)
spectra_base_cor <- baselineCorrection(spectra_data)

[Package ASICS version 1.2.0 Index]