Skip to contents

Takes an object of type aligns, i.e., a list of deconvoluted and aligned spectra, extracts the vector of aligned signal integrals for each spectrum and returns them as a matrix with datapoints in rows and spectra in columns.

Usage

get_si_mat(x)

Arguments

x

An object of type aligns.

Value

A matrix of aligned signal intensities.

Author

2024-2025 Tobias Schmidt: initial version.

Examples

decons <- deconvolute(sim[1:2], sfr = c(3.55, 3.35))
#> 2025-04-17 14:52:00.54 Starting deconvolution of 2 spectra using 1 worker
#> 2025-04-17 14:52:00.54 Starting deconvolution of sim_01
#> 2025-04-17 14:52:00.54 Removing water signal
#> 2025-04-17 14:52:00.54 Removing negative signals
#> 2025-04-17 14:52:00.54 Smoothing signals
#> 2025-04-17 14:52:00.55 Starting peak selection
#> 2025-04-17 14:52:00.56 Detected 314 peaks
#> 2025-04-17 14:52:00.56 Removing peaks with low pscores
#> 2025-04-17 14:52:00.56 Removed 287 peaks
#> 2025-04-17 14:52:00.56 Initializing Lorentz curves
#> 2025-04-17 14:52:00.56 MSE at peak tiplet positions: 4.0838805770844048836921
#> 2025-04-17 14:52:00.56 Refining Lorentz Curves
#> 2025-04-17 14:52:00.56 MSE at peak tiplet positions: 0.1609359876216345797140
#> 2025-04-17 14:52:00.56 MSE at peak tiplet positions: 0.0228015051613790313556
#> 2025-04-17 14:52:00.57 MSE at peak tiplet positions: 0.0071638016610617799920
#> 2025-04-17 14:52:00.57 Formatting return object as decon2
#> 2025-04-17 14:52:00.57 Finished deconvolution of sim_01
#> 2025-04-17 14:52:00.57 Starting deconvolution of sim_02
#> 2025-04-17 14:52:00.57 Removing water signal
#> 2025-04-17 14:52:00.57 Removing negative signals
#> 2025-04-17 14:52:00.57 Smoothing signals
#> 2025-04-17 14:52:00.58 Starting peak selection
#> 2025-04-17 14:52:00.60 Detected 316 peaks
#> 2025-04-17 14:52:00.60 Removing peaks with low pscores
#> 2025-04-17 14:52:00.60 Removed 286 peaks
#> 2025-04-17 14:52:00.60 Initializing Lorentz curves
#> 2025-04-17 14:52:00.60 MSE at peak tiplet positions: 3.8338943428876719465848
#> 2025-04-17 14:52:00.60 Refining Lorentz Curves
#> 2025-04-17 14:52:00.60 MSE at peak tiplet positions: 0.1289481941626757499630
#> 2025-04-17 14:52:00.60 MSE at peak tiplet positions: 0.0135651899090413786964
#> 2025-04-17 14:52:00.60 MSE at peak tiplet positions: 0.0025556755331531087749
#> 2025-04-17 14:52:00.61 Formatting return object as decon2
#> 2025-04-17 14:52:00.61 Finished deconvolution of sim_02
#> 2025-04-17 14:52:00.61 Finished deconvolution of 2 spectra in 0.069 secs
aligns <- align(decons)
#> 2025-04-17 14:52:00.61 All requested packages are already installed.
#> 
#> 
#>  --------------------------------
#>  dohCluster will run with maxShift= 50
#>  If you want dohCluster to detect the optimal maxShift automatically,
#>  use dohCluster(..., maxShift = NULL, ...)
#>  --------------------------------
#> 
#>  aligning spectrum  1
#>  Median pearson correlation of aligned spectra: 0.9976321
#>  Alignment time:  2e-04  minutes
si_mat <- get_si_mat(aligns) # 2048 x 2 matrix (2048 datapoints, 2 spectra)