From 2254fc9c76828f91e94918e6e89c6e55a14a1ed4 Mon Sep 17 00:00:00 2001 From: Yamei Deng Date: Thu, 18 Jan 2024 23:54:32 -0500 Subject: [PATCH] export score_all attribute to a new column in psm.tsv --- Makefile | 2 +- lib/id/pep.go | 4 +++- lib/rep/psm.go | 7 ++++--- lib/spc/pepxml.go | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 233fffe4..069a29de 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ VERSION = $(shell date +%Y%m%d) BUILD = $(shell date +%Y%m%d%H%M) TAG = v5.1.1 -RC = RC02 +RC = RC03 LDFLAGS = -ldflags "-w -s -extldflags -static -X main.version=${TAG} -X main.build=${BUILD}" diff --git a/lib/id/pep.go b/lib/id/pep.go index fa6cae0a..4c570f77 100644 --- a/lib/id/pep.go +++ b/lib/id/pep.go @@ -109,6 +109,7 @@ type MSFraggerLoc struct { MSFraggerLocalizationScoreWithPTM string MSFraggerLocalizationScoreWithoutPTM string MSFraggerLocalizationScores string + MSFraggerScoreAll string } // PepIDList is a list of PeptideSpectrumMatch @@ -493,7 +494,8 @@ func processSpectrumQuery(sq spc.SpectrumQuery, mods mod.Modifications, decoyTag MSFragerLocalization: i.PTMResult.LocalizationPeptide, MSFraggerLocalizationScoreWithPTM: i.PTMResult.BestScoreWithPTM, MSFraggerLocalizationScoreWithoutPTM: i.PTMResult.ScoreWithoutPTM, - MSFraggerLocalizationScores: i.PTMResult.LocalizationScores} + MSFraggerLocalizationScores: i.PTMResult.LocalizationScores, + MSFraggerScoreAll: i.PTMResult.ScoreAll} } // to be able to accept multiple entries with the same spectrum name, we fuse the diff --git a/lib/rep/psm.go b/lib/rep/psm.go index d089b92e..1aa7836f 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 Score without Delta Mass\tLocalization Scores" + header += "\tMSFragger Localization\tBest Score with Delta Mass\tBest Score without Delta Mass\tLocalization Scores\tScore All" } if hasIonMob { @@ -618,12 +618,13 @@ 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", + line = fmt.Sprintf("%s\t%s\t%s\t%s\t%s\t%s", line, MSFraggerLoc.MSFragerLocalization, MSFraggerLoc.MSFraggerLocalizationScoreWithPTM, MSFraggerLoc.MSFraggerLocalizationScoreWithoutPTM, - MSFraggerLoc.MSFraggerLocalizationScores) + MSFraggerLoc.MSFraggerLocalizationScores, + MSFraggerLoc.MSFraggerScoreAll) } if hasIonMob { diff --git a/lib/spc/pepxml.go b/lib/spc/pepxml.go index b9f77b74..0d43975d 100644 --- a/lib/spc/pepxml.go +++ b/lib/spc/pepxml.go @@ -220,4 +220,5 @@ type PTMResult struct { ScoreWithoutPTM string `xml:"score_without_ptm,attr"` LocalizationPeptide string `xml:"localization_peptide,attr"` LocalizationScores string `xml:"localization_scores,attr"` + ScoreAll string `xml:"scores_all,attr"` }