Repository navigation
Fixed ms2rescore bugs - #36
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Code Suggestions ✨Explore these optional code suggestions:
|
ypriverol
left a comment
There was a problem hiding this comment.
@daichengxin can you provide a test case for this? Basically take the test and remove for one PSM the scores.
|
@jpfeuffer can you also take a look here in case Im missing something. |
| peptide_id_metadata = { | ||
| "idxml:score_type": str(peptide_id.getScoreType()), | ||
| "idxml:higher_score_better": str(peptide_id.isHigherScoreBetter()), | ||
| "idxml:significance_threshold": str(peptide_id.getSignificanceThreshold()), |
There was a problem hiding this comment.
we probably don't use the significance threshold
There was a problem hiding this comment.
what do you mean? I think this logic is in the original ms2rescore from @jonasscheid, no @daichengxin? How is it used in ms2rescore?
There was a problem hiding this comment.
@jpfeuffer is this always annotated: peptide_id.getSignificanceThreshold()?
There was a problem hiding this comment.
Afaik MS2Rescore computes the q-value before rescoring and IdXMLWriter puts it as a metaValue in the PeptideHit obj. Maybe you can just get that score and probably you don't need to to any extra steps in that regard
There was a problem hiding this comment.
what do you mean? I think this logic is in the original ms2rescore from @jonasscheid, no @daichengxin? How is it used in ms2rescore?
Yes. This logic is in the original ms2rescore. I only reconstruct parse psm function to skip invalid psm without search engines score features.
There was a problem hiding this comment.
@jonasscheid This error comes from MSGF+, which produces some PSMs without search engine scores. bigbio/quantms#447
In the new version of OpenMS @timosachsenberg has introduced a patch OpenMS/OpenMS#7713. Im wondering if we need to also remove the PSMs with the latest dummy values:
hit->setMetaValue("MeanErrorAll", 0.0);
hit->setMetaValue("StdevErrorAll", 0.0);
hit->setMetaValue("MeanErrorTop7", 0.0);
hit->setMetaValue("StdevErrorTop7", 0.0);
hit->setMetaValue("MeanRelErrorAll", 0.0);
hit->setMetaValue("StdevRelErrorAll", 0.0);
hit->setMetaValue("MeanRelErrorTop7", 0.0);
hit->setMetaValue("StdevRelErrorTop7", 0.0);
There was a problem hiding this comment.
I would keep them an evaluate
There was a problem hiding this comment.
I vote keep if these dummy values have not effect. Are these PSMs likely to appear in the final results or are they filtered out in subsequent steps?
There was a problem hiding this comment.
If they are of general low quality I think ms2rescore and percolator will assign a bad score so they get filtered out.
So no problem there. On the other had good hits (e.g., with good denovo or raw score) can still survice the filtering even though the other scores are set to dummy values. I think this is better than just filtering them.
There was a problem hiding this comment.
But they will not be used, no? With no score, those PSMS will be noisy all over the place. I can guess they will receive some scores coming from ms2rescore because some new features are introduced, like PEPLEN, PredictedRT, MS2PIP, etc., but the original search engine scores will be gone. In the downstream analysis, this will also be strange because you have PSMs with no Scores.
BTW, @timosachsenberg the version from MSGF+ that OpenMS is using is MS-GF+ Release (v2023.01.12) (12 January 2023), I re-run the dataset with the latest version of MSGF+ here the mziD: bigbio/quantms#447 (comment)
|
Looks fine. I also never used the significance threshold. |
PR Type
enhancement, bug_fix
Description
IDXMLReaderPatchclass to improve idXML file reading, allowing for better PSM parsing with additional metadata and rescoring features.Changes walkthrough 📝
psm_conversion.py
Enhance PSM conversion with 'q-value' handlingquantmsutils/psm/psm_conversion.py
ms2rescore.py
Enhance idXML reading and PSM parsing with metadataquantmsutils/rescoring/ms2rescore.py
IDXMLReaderPatchclass for improved idXML reading.features.