View source: R/53_ms2_spectra_matching_scores.R
calculate_dotproduct | R Documentation |
This function calculates the dot product score between experimental and library MS2 spectra intensities. It weights the intensities and computes the similarity score using a modified dot product formula.
calculate_dotproduct(exp.int, lib.int)
exp.int |
A numeric vector of intensities from the experimental spectrum. |
lib.int |
A numeric vector of intensities from the library spectrum. |
The function applies a custom weighting scheme to the experimental and library intensities, where the weight for each intensity value is computed based on its proportion relative to the total sum of intensities in its respective spectrum. The weighted intensities are then used to calculate the dot product score, which is normalized to give a similarity score between the two spectra.
A numeric value representing the dot product similarity score between the experimental and library spectra.
Xiaotao Shen xiaotao.shen@outlook.com
calculate_dotproduct(exp.int = 1:10, lib.int = 1:10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.