Skip to content

Commit

Permalink
Propagate new localization scores to psm.tsv
Browse files Browse the repository at this point in the history
  • Loading branch information
fcyu committed Jan 21, 2024
1 parent 7c1cb3d commit 1abf182
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions lib/id/pep.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
}
}

Expand Down
8 changes: 5 additions & 3 deletions lib/rep/psm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand All @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions lib/spc/pepxml.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

0 comments on commit 1abf182

Please sign in to comment.