Repository navigation
Add msfragger tsv reader - #367
Merged
Merged
Conversation
GeorgWa
requested review from
Copilot,
lucas-diedrich,
mschwoer and
vbrennsteiner
November 24, 2025 15:36
There was a problem hiding this comment.
Pull request overview
This PR adds support for reading MSFragger's PSM TSV output format by implementing a new reader class and modification translation system.
Key Changes:
- Implemented
MSFragger_PSM_TSV_Readerto parse MSFragger's tab-separated PSM files - Added
MSFraggerModificationTranslationclass to convert MSFragger modification format to alphabase format - Comprehensive test coverage including unit tests for modification parsing and integration tests
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| alphabase/psm_reader/msfragger_reader.py | Core implementation of MSFragger PSM TSV reader and modification translator |
| alphabase/psm_reader/keys.py | Added ASSIGNED_MODS constant for modification column mapping |
| alphabase/constants/const_files/psm_reader.yaml | Configuration for MSFragger PSM TSV format including column mappings and supported modifications |
| tests/unit/psm_reader/test_psm_reader_provider.py | Updated provider test to include new reader types |
| tests/unit/psm_reader/test_msfragger_psm_tsv.py | Unit tests for reader functionality and data processing |
| tests/unit/psm_reader/test_msfragger_modification_translation.py | Unit tests for modification translation logic |
| tests/integration/test_psm_readers.py | Integration test with sample data to verify end-to-end functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mschwoer
reviewed
Nov 25, 2025
lucas-diedrich
approved these changes
Nov 25, 2025
- Rename MSFragger_PSM_TSV_Reader to MSFraggerPsmTsvReader - Rename ASSIGNED_MODS to TMP_MODS (_tmp_mods) for clarity - Add MsFraggerTokens class for string constants - Make instance variables private (_mass_mapped_mods, _mod_mass_tol) - Improve variable names (pos_aa_str -> position_and_amino_acid, etc.) - Remove redundant empty check in __call__ - Combine preprocessing into single apply() call - Simplify docstrings, add output example - Add docs link to psm_reader.yaml - Document TMP_MODS in PsmDfCols docstring - Improve error message for unknown modifications - Update tests to reference yaml config instead of hardcoded values 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a reader for the fdr controlled precursor format of MSFragger