-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
major changes about PSMs bugs. #7
Conversation
fixed bugs
fixed bugs for invalid psm
WalkthroughThis pull request introduces a version update from 0.0.2 to 0.0.3 across multiple files, including Changes
Sequence DiagramsequenceDiagram
participant Reader as IDXMLReaderPatch
participant PSM as Peptide Spectrum Match
participant Filter as Filtering Process
Reader->>PSM: Iterate through PSMs
Reader->>Filter: Validate PSMs
Filter-->>Reader: Create new_peptide_ids
Reader->>Filter: Process only valid PSMs
Poem
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command 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 (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
quantmsrescore/ms2rescore.py (2)
39-39
: Consider renaming or documenting the purpose of new_peptide_ids.
While "new_peptide_ids" conveys that these IDs are different from the original, it might be beneficial to clarify further—e.g., calling them "valid_peptide_ids" or adding a short docstring explaining their usage.
65-68
: Minor docstring grammar and formatting improvement.
The explanation is clear, but you might want to break it into multiple lines or add punctuation to increase readability. Here is a quick example:The invalid PSMs are directly from search engine results (MSGF+). The search engine doesn't report search -score features (e.g. MSGF:ScoreRatio) for these invalid PSMs. And we can observe the NumMatchedMainIons of -peptide hit is 0. So we should remove these invalid PSMs +score features (e.g., MSGF:ScoreRatio) for these invalid PSMs, and the NumMatchedMainIons of +the peptide hit is 0. Therefore, we should remove these invalid PSMs.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
pyproject.toml
(1 hunks)quantmsrescore/__init__.py
(1 hunks)quantmsrescore/ms2rescore.py
(3 hunks)recipe/meta.yaml
(1 hunks)
✅ Files skipped from review due to trivial changes (3)
- recipe/meta.yaml
- pyproject.toml
- quantmsrescore/init.py
🔇 Additional comments (3)
quantmsrescore/ms2rescore.py (3)
71-82
: Validate the handling of invalid PSMs and confirm that logging is sufficient.
When invalid hits are discarded (skip counter incremented), valid hits are added back to the peptide ID and appended to “new_peptide_ids.” This flow appears correct for filtering invalid PSMs, but it might be useful to log how many valid hits remain in each peptide ID to ensure appropriate debugging information.
253-256
: Ensure new_peptide_ids are not empty unless expected.
Switching from original “peptide_ids” to “new_peptide_ids” when invalid PSMs are found is correct. However, confirm that this doesn’t introduce edge cases when all PSMs are invalid in certain files.
261-261
: Filtering artifact PSMs is properly placed.
Invoking “filter_out_artifact_psms” after invalid PSMs are removed ensures only valid hits remain. The design is aligned with good separation of concerns. No additional action is required.
Summary by CodeRabbit
New Features
Version Updates