From 1abf1826fb7b31c479ce8531863f88680f1848a9 Mon Sep 17 00:00:00 2001 From: Fengchao Date: Sun, 21 Jan 2024 16:41:40 -0500 Subject: [PATCH] Propagate new localization scores to psm.tsv --- lib/id/pep.go | 4 ++++ lib/rep/psm.go | 8 +++++--- lib/spc/pepxml.go | 2 ++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/id/pep.go b/lib/id/pep.go index eef2f4e5..c373a8fb 100644 --- a/lib/id/pep.go +++ b/lib/id/pep.go @@ -111,10 +111,12 @@ type MSFraggerLoc struct { MSFraggerLocalizationScoreWithoutPTM string MSFraggerLocalizationScores string MSFraggerScoreAll string + MSFraggerScoreOnlyShifted string MSFraggerLocalizationScoreWithPTMIons string MSFraggerLocalizationSecondScoreWithPTMIons string MSFraggerLocalizationScoreWithoutPTMIons string MSFraggerScoreAllIons string + MSFraggerScoreOnlyShiftedIons string } // PepIDList is a list of PeptideSpectrumMatch @@ -502,10 +504,12 @@ func processSpectrumQuery(sq spc.SpectrumQuery, mods mod.Modifications, decoyTag MSFraggerLocalizationScoreWithoutPTM: i.PTMResult.ScoreWithoutPTM, MSFraggerLocalizationScores: i.PTMResult.LocalizationScores, MSFraggerScoreAll: i.PTMResult.ScoreAll, + MSFraggerScoreOnlyShifted: i.PTMResult.ScoreOnlyShifted, MSFraggerLocalizationScoreWithPTMIons: i.PTMResult.BestScoreWithPTMIons, MSFraggerLocalizationSecondScoreWithPTMIons: i.PTMResult.SecondBestScoreWithPTMIons, MSFraggerLocalizationScoreWithoutPTMIons: i.PTMResult.ScoreWithoutPTMIons, MSFraggerScoreAllIons: i.PTMResult.ScoreAllIons, + MSFraggerScoreOnlyShiftedIons: i.PTMResult.ScoreOnlyShiftedIons, } } diff --git a/lib/rep/psm.go b/lib/rep/psm.go index 48f2a7c8..f9a9cfd3 100644 --- a/lib/rep/psm.go +++ b/lib/rep/psm.go @@ -236,7 +236,7 @@ func (evi PSMEvidenceList) PSMReport(workspace, brand, decoyTag string, channels } if hasLoc { - header += "\tMSFragger Localization\tBest Score with Delta Mass\tBest Matched Ions with Delta Mass\tSecond Best Score with Delta Mass\tSecond Best Matched Ions with Delta Mass\tBest Score without Delta Mass\tMatched Ions without Delta mass\tLocalization Scores\tScore All\tMatched Ions All" + header += "\tMSFragger Localization\tBest Score with Delta Mass\tBest Matched Ions with Delta Mass\tSecond Best Score with Delta Mass\tSecond Best Matched Ions with Delta Mass\tBest Score without Delta Mass\tMatched Ions without Delta mass\tLocalization Scores\tScore All\tMatched Ions All\tScore Delta Mass Only\tMatched Ions Delta Mass Only" } if hasIonMob { @@ -618,7 +618,7 @@ func (evi PSMEvidenceList) PSMReport(workspace, brand, decoyTag string, channels if MSFraggerLoc == nil { MSFraggerLoc = &id.MSFraggerLoc{} } - line = fmt.Sprintf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s", + line = fmt.Sprintf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s", line, MSFraggerLoc.MSFragerLocalization, MSFraggerLoc.MSFraggerLocalizationScoreWithPTM, @@ -629,7 +629,9 @@ func (evi PSMEvidenceList) PSMReport(workspace, brand, decoyTag string, channels MSFraggerLoc.MSFraggerLocalizationScoreWithoutPTMIons, MSFraggerLoc.MSFraggerLocalizationScores, MSFraggerLoc.MSFraggerScoreAll, - MSFraggerLoc.MSFraggerScoreAllIons) + MSFraggerLoc.MSFraggerScoreAllIons, + MSFraggerLoc.MSFraggerScoreOnlyShifted, + MSFraggerLoc.MSFraggerScoreOnlyShiftedIons) } if hasIonMob { diff --git a/lib/spc/pepxml.go b/lib/spc/pepxml.go index 350881e1..f770103f 100644 --- a/lib/spc/pepxml.go +++ b/lib/spc/pepxml.go @@ -226,4 +226,6 @@ type PTMResult struct { LocalizationScores string `xml:"localization_scores,attr"` ScoreAll string `xml:"score_all,attr"` ScoreAllIons string `xml:"score_all_matched_ions,attr"` + ScoreOnlyShifted string `xml:"score_only_shifted,attr"` + ScoreOnlyShiftedIons string `xml:"score_only_shifted_matched_ions,attr"` }