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-05-07 12:14:50.33 Starting deconvolution of 2 spectra using 1 worker
#> 2025-05-07 12:14:50.33 Starting deconvolution of sim_01
#> 2025-05-07 12:14:50.33 Removing water signal
#> 2025-05-07 12:14:50.33 Removing negative signals
#> 2025-05-07 12:14:50.33 Smoothing signals
#> 2025-05-07 12:14:50.34 Starting peak selection
#> 2025-05-07 12:14:50.35 Detected 314 peaks
#> 2025-05-07 12:14:50.35 Removing peaks with low pscores
#> 2025-05-07 12:14:50.35 Removed 287 peaks
#> 2025-05-07 12:14:50.35 Initializing Lorentz curves
#> 2025-05-07 12:14:50.35 MSE at peak tiplet positions: 4.0838805770844048836921
#> 2025-05-07 12:14:50.35 Refining Lorentz Curves
#> 2025-05-07 12:14:50.35 MSE at peak tiplet positions: 0.1609359876216345797140
#> 2025-05-07 12:14:50.36 MSE at peak tiplet positions: 0.0228015051613790313556
#> 2025-05-07 12:14:50.36 MSE at peak tiplet positions: 0.0071638016610617799920
#> 2025-05-07 12:14:50.36 Formatting return object as decon2
#> 2025-05-07 12:14:50.36 Finished deconvolution of sim_01
#> 2025-05-07 12:14:50.36 Starting deconvolution of sim_02
#> 2025-05-07 12:14:50.36 Removing water signal
#> 2025-05-07 12:14:50.36 Removing negative signals
#> 2025-05-07 12:14:50.36 Smoothing signals
#> 2025-05-07 12:14:50.37 Starting peak selection
#> 2025-05-07 12:14:50.39 Detected 316 peaks
#> 2025-05-07 12:14:50.39 Removing peaks with low pscores
#> 2025-05-07 12:14:50.39 Removed 286 peaks
#> 2025-05-07 12:14:50.39 Initializing Lorentz curves
#> 2025-05-07 12:14:50.39 MSE at peak tiplet positions: 3.8338943428876719465848
#> 2025-05-07 12:14:50.39 Refining Lorentz Curves
#> 2025-05-07 12:14:50.39 MSE at peak tiplet positions: 0.1289481941626757499630
#> 2025-05-07 12:14:50.39 MSE at peak tiplet positions: 0.0135651899090413786964
#> 2025-05-07 12:14:50.39 MSE at peak tiplet positions: 0.0025556755331531087749
#> 2025-05-07 12:14:50.40 Formatting return object as decon2
#> 2025-05-07 12:14:50.40 Finished deconvolution of sim_02
#> 2025-05-07 12:14:50.40 Finished deconvolution of 2 spectra in 0.07 secs
aligns <- align(decons)
#> 2025-05-07 12:14:50.40 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)