From 18e16eec92672937e525fae89080d33f5d2e7e78 Mon Sep 17 00:00:00 2001 From: colin-combe Date: Mon, 24 Feb 2020 10:51:42 +0000 Subject: [PATCH] max modification count --- src/CLMS/model/SpectrumMatch.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/CLMS/model/SpectrumMatch.js b/src/CLMS/model/SpectrumMatch.js index 33727bf..38cf6df 100644 --- a/src/CLMS/model/SpectrumMatch.js +++ b/src/CLMS/model/SpectrumMatch.js @@ -549,9 +549,12 @@ CLMS.model.SpectrumMatch.prototype.modificationCount = function() { return count; } - var modCount = peptideModCount(this.matchedPeptides[0]); + var modCount1 = peptideModCount(this.matchedPeptides[0]); if (this.matchedPeptides[1]) { - modCount += peptideModCount(this.matchedPeptides[1]); + var modCount2 = peptideModCount(this.matchedPeptides[1]); + if (modCount2 > modCount1) { + return modCount2; + } } - return modCount; + return modCount1; }