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.
Value
An object of type align
as described in metabodecon_classes.
Examples
sim_dir <- metabodecon_file("bruker/sim")
spectra <- read_spectra(sim_dir)
decons <- deconvolute(spectra, sfr = c(3.55, 3.35))
aligned <- align(decons)
aligned
#> aligns object with 16 align elements
#> sim_01: align object (2048 dp, 3.6 to 3.3 ppm, 27 peaks)
#> sim_02: align object (2048 dp, 3.6 to 3.3 ppm, 30 peaks)
#> sim_03: align object (2048 dp, 3.6 to 3.3 ppm, 25 peaks)
#> sim_04: align object (2048 dp, 3.6 to 3.3 ppm, 26 peaks)
#> sim_05: align object (2048 dp, 3.6 to 3.3 ppm, 26 peaks)
#> sim_06: align object (2048 dp, 3.6 to 3.3 ppm, 24 peaks)
#> sim_07: align object (2048 dp, 3.6 to 3.3 ppm, 29 peaks)
#> sim_08: align object (2048 dp, 3.6 to 3.3 ppm, 26 peaks)
#> sim_09: align object (2048 dp, 3.6 to 3.3 ppm, 28 peaks)
#> sim_10: align object (2048 dp, 3.6 to 3.3 ppm, 35 peaks)
#> sim_11: align object (2048 dp, 3.6 to 3.3 ppm, 29 peaks)
#> sim_12: align object (2048 dp, 3.6 to 3.3 ppm, 28 peaks)
#> sim_13: align object (2048 dp, 3.6 to 3.3 ppm, 25 peaks)
#> sim_14: align object (2048 dp, 3.6 to 3.3 ppm, 27 peaks)
#> sim_15: align object (2048 dp, 3.6 to 3.3 ppm, 29 peaks)
#> sim_16: align object (2048 dp, 3.6 to 3.3 ppm, 28 peaks)