mz_a <- c(169.071, 186.066, 186.0769)
intensity_a <- c(7.917962, 1.021589, 100.0)
mz_b <- c(120.212, 169.071, 186.066)
intensity_b <- c(37.16, 66.83, 999.0)
peaks_a <- matrix(c(mz_a, intensity_a), ncol = 2, byrow = FALSE)
peaks_b <- matrix(c(mz_b, intensity_b), ncol = 2, byrow = FALSE)
calculate_entropy_similarity(peaks_a, peaks_b,
ms2_tolerance_in_da = 0.02, ms2_tolerance_in_ppm = -1,
clean_spectra = TRUE, min_mz = 0, max_mz = 1000,
noise_threshold = 0.01,
max_peak_num = 100)
Run the code above in your browser using DataLab