alignSpectra: Alignment

Description Usage Arguments Value References Examples

View source: R/load_data.R

Description

Align spectra of a data frame by a method based on the CluPA algorithm (Vu et al., (2011))

Usage

1
2
3
4
5
6
7
alignSpectra(
  spectra,
  reference = NULL,
  max.shift = 0.02,
  ncores = 1,
  verbose = TRUE
)

Arguments

spectra

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

reference

Index of the reference spectrum used for the alignment. Default to NULL, i.e. the reference spectrum is automatically detected.

max.shift

Maximum shift allowed for the alignment. Default to 0.002.

ncores

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

verbose

A boolean value to allow print out process information.

Value

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

References

Vu, T. N., Valkenborg, D., Smets, K., Verwaest, K. A., Dommisse, R., Lemiere, F., ... & Laukens, K. (2011). An integrated workflow for robust alignment and simplified quantitative analysis of NMR spectrometry data. BMC Bioinformatics, 12(1), 405.

Examples

1
2
3
4
current_path <- system.file("extdata", package = "ASICS")
spectra_data <- importSpectra(name.dir = current_path,
                     name.file = "spectra_example.txt", type.import = "txt")
spectra_align <- alignSpectra(spectra_data)

GaelleLefort/ASICS documentation built on July 19, 2020, 2:08 p.m.