Align signals across a list of deconvoluted spectra using the 'CluPA'
algorithm from the 'speaq' package, described in Beirnaert et al. (2018)
doi:10.1371/journal.pcbi.1006018 and Vu et al. (2011)
doi:10.1186/1471-2105-12-405 plus the additional peak combination described
in combine_peaks()
.
Arguments
- x
An object of type
decons1
ordecons2
as described in Metabodecon Classes. To aligndecons0
objects (as returned by the now deprecated MetaboDecon1D), you can useas_decons2()
to convert it to adecons2
object first.- maxShift
Maximum number of points along the "ppm-axis" a value can be moved by the 'speaq' package. 50 is a suitable starting value for plasma spectra with a digital resolution of 128K. Note that this parameter has to be individually optimized depending on the type of analyzed spectra and the digital resolution. For urine which is more prone to chemical shift variations this value most probably has to be increased. Passed as argument
maxShift
tospeaq_align()
.- maxCombine
Amount of adjacent columns which may be combined for improving the alignment. Passed as argument
range
tocombine_peaks()
.- verbose
Whether to print additional information during the alignment process.
- install_deps
Alignment relies on the 'speaq' package, which itself relies on the 'MassSpecWavelet' and 'impute' packages. Both, 'MassSpecWavelet' and 'impute' are not available on CRAN, but can be installed from Bioconductor or R-Universe. If
install_deps=TRUE
, these packages will be automatically installed from R-Universe without asking for confirmation. Ifinstall_deps=NULL
(default), the user will be asked for confirmation before installing missing dependencies. If asking for confirmation is not possible orinstall_deps=FALSE
, the function will raise an error if the packages are not installed.
Value
An object of type align
as described in Metabodecon Classes.
Examples
if (interactive()) {
# Example requires an interactive R session, because in case of missing
# dependencies the user will be asked for confirmation to install them.
decons <- deconvolute(sim[1:2], sfr = c(3.55, 3.35))
aligned <- align(decons)
}