calculate_dotproduct: Calculate Dot Product Score for MS2 Spectra

View source: R/53_ms2_spectra_matching_scores.R

calculate_dotproductR Documentation

Calculate Dot Product Score for MS2 Spectra

Description

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.

Usage

calculate_dotproduct(exp.int, lib.int)

Arguments

exp.int

A numeric vector of intensities from the experimental spectrum.

lib.int

A numeric vector of intensities from the library spectrum.

Details

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.

Value

A numeric value representing the dot product similarity score between the experimental and library spectra.

Author(s)

Xiaotao Shen xiaotao.shen@outlook.com

Examples

calculate_dotproduct(exp.int = 1:10, lib.int = 1:10)


tidymass/metid documentation built on Oct. 8, 2024, 10:32 p.m.