Repository navigation
Add fragment annotation arrays to PSM schema - #115
Conversation
|
@timosachsenberg 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Co-authored-by: timosachsenberg <[email protected]>
|
@copilot can you check PythonBlack |
Co-authored-by: ypriverol <[email protected]>
Applied Black formatting to all modified files. The test file needed formatting adjustments to comply with PEP 8 standards. All files now pass |
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||
User description
Add Fragment Annotation Arrays to PSM Schema - COMPLETED ✅
Successfully implemented fragment-level annotation arrays to store fragment ion metadata from modern search engines like Sage.
Implementation Completed
Added three new nullable array fields to PSM schema in
quantmsio/core/format.py:charge_array:pa.list_(pa.int32())- Fragment ion charge valuesion_type_array:pa.list_(pa.string())- Fragment ion type annotations (b, y, a, etc.)ion_mobility_array:pa.list_(pa.float32())- Fragment ion mobility valuesUpdated all data processing modules to initialize new fields as
None:quantmsio/core/maxquant.py- MaxQuant PSM transformationquantmsio/core/psm.py- General PSM processingquantmsio/core/fragpipe.py- FragPipe data conversionquantmsio/operate/tools.py- Spectrum mapping operationsAdded comprehensive test suite in
tests/test_fragment_annotations.py:Applied Black code formatting to all modified files to ensure compliance with CI requirements
Technical Implementation
mz_arrayandintensity_arrayUsage Example
Future Extensions
Search engine adapters can now be updated to populate these fields when fragment annotations are available, enabling:
This implementation provides a robust foundation for fragment annotation storage while maintaining full compatibility with existing quantms.io workflows.
Fixes #108.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.
PR Type
Enhancement
Description
Add three fragment annotation arrays to PSM schema
Initialize new fields as None in data processing modules
Add comprehensive test suite for fragment annotations
Maintain backward compatibility with existing datasets
Diagram Walkthrough
File Walkthrough
format.py
Add fragment annotation arrays to PSM schemaquantmsio/core/format.py
charge_arrayfor fragment ion charges (int32)ion_type_arrayfor ion type annotations (string)ion_mobility_arrayfor mobility values (float32)fragpipe.py
Initialize fragment arrays in FragPipe modulequantmsio/core/fragpipe.py
charge_arrays,ion_type_arrays,ion_mobility_arraysto_arrowmethodmaxquant.py
Initialize fragment arrays in MaxQuant modulequantmsio/core/maxquant.py
charge_array,ion_type_array,ion_mobility_arrayto Nonetransform_psmmethod for compatibilitypsm.py
Initialize fragment arrays in PSM modulequantmsio/core/psm.py
add_addition_msgcharge_array,ion_type_array,ion_mobility_arrayas Nonetools.py
Initialize fragment arrays in tools modulequantmsio/operate/tools.py
generate_psms_of_spectrumfunctiontest_fragment_annotations.py
Add comprehensive fragment annotation teststests/test_fragment_annotations.py