| dohCluster | R Documentation |
Helper function of align(). Should not be called directly by the user.
Rewrite of speaq::dohCluster(), compatible with the data format returned by
'generate_lorentz_curves()' and 'gen_feat_mat()'. The function name
"dohCluster" comes from "Do Hierarchical Clustering" which is part of the
Alignment algorithm proposed by Vu et al. (2011) in
doi:10.1186/1471-2105-12-405.
Direct usage of this function has been deprecated with metabodecon version 1.4.3 and will be removed with metabodecon version 2.0.0.
dohCluster(
X,
peakList,
refInd = 0,
maxShift = 100,
acceptLostPeak = TRUE,
verbose = TRUE
)
X |
Dataframe of signal intensities from all spectra as returned by
|
peakList |
List of peak indices as returned |
refInd |
Number of the reference spectrum i.e. the spectrum to which all signals will be aligned to. |
maxShift |
Maximum number of points a value can be moved. |
acceptLostPeak |
Whether to allow the the alignment algorithm to ignore peaks that cannot easily be aligned with the reference spectrum. |
verbose |
Whether to print additional information during the alignment process. |
A list containing two data frames Y and new_peakList. The first one
contains the aligned spectra, the second one contains the aligned signals of
each spectrum.
2021-2024 Wolfram Gronwald: initial version.
2024-2025 Tobias Schmidt: refactored initial version.
deps <- c("MassSpecWavelet", "impute")
deps_installed <- sapply(deps, requireNamespace, quietly = TRUE)
if (all(deps_installed)) {
# 'speaq' requires 'MassSpecWavelet' and 'impute' to be installed
sim_subset <- metabodecon_file("bruker/sim_subset")
decons <- generate_lorentz_curves_sim(sim_subset)
feat <- gen_feat_mat(decons)
refObj <- speaq::findRef(feat$peakList)
hclObj <- dohCluster(
X = feat$data_matrix,
peakList = feat$peakList,
refInd = refObj$refInd,
maxShift = 100,
acceptLostPeak = TRUE,
verbose = TRUE
)
str(hclObj, 1)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.