There may be an error when calculating the number of peaks matched
lhuangjs opened this issue · comments
Because the existence of fragment tolerance, a peak may match two or more peaks. Like the picture show, p3 will match p1 and p2. However, in your code(/src/main/java/cal/cumulativeBinomialProbability/spectra/CompareAndScore.java
line from 150 to 215), you did not use a array to store all possible matching peaks but only use a variable to store one possible matching peak. Is it a problem?
Thanks
Hello,
Thank you for your question. For peak match finding only one peak is selected to be best match according to the algorithm. Peaks are already pre-filtered and peaks with highest intensity above threshold selected in advance. And then the peak which is closest to the query peak is selected best match. In that function we are trying to find whether the given peak has a match or not in given fragment tolerance, not the number of match peak found.
Hello,
Thank you for your answer! But I still have some question.
-
- you mentioned best match, Whether is it necessary to record all matching peaks of the query peak and then the closest one is selected. (their mz value are closest)