get_spectra_match_score is used to get two MS2 spectra match score, see MS-DIAL

get_spectra_match_score(
  exp.spectrum,
  lib.spectrum,
  ppm.tol = 30,
  mz.ppm.thr = 400,
  fraction.weight = 0.2,
  dp.forward.weight = 0.7,
  dp.reverse.weight = 0.1,
  remove_fragment_intensity_cutoff = 0
)

Arguments

exp.spectrum

exp.spectrum

lib.spectrum

lib.spectrum

ppm.tol

ppm.tol

mz.ppm.thr

mz.ppm.thr

fraction.weight

fraction.weight

dp.forward.weight

dp.forward.weight

dp.reverse.weight

dp.reverse.weight

remove_fragment_intensity_cutoff

default is 0 (100 percentage).

Value

spectrum match score

Author

Xiaotao Shen shenxt1990@outlook.com

Examples

exp.spectrum <- data.frame(mz = 1:10, intensity = 1:10)
lib.spectrum <- data.frame(mz = 1:10, intensity = 1:10)
get_spectra_match_score(exp.spectrum, lib.spectrum)
#> [1] 1