Skip to content

Fix/modification writing - #3

Merged
singjc merged 11 commits into
masterfrom
fix/modification_writing
Feb 19, 2026
Merged

Fix/modification writing#3
singjc merged 11 commits into
masterfrom
fix/modification_writing

Conversation

@singjc

@singjc singjc commented Feb 19, 2026

Copy link
Copy Markdown
Owner

This pull request introduces several enhancements and usability improvements to the in-silico peptide query parameter generation tool, with a focus on support for UniMod modification reannotation, improved configuration flexibility, and clearer decoy handling. It also updates documentation and model architecture references to reflect these changes.

Major new features and improvements:

UniMod modification reannotation:

  • Added support for automatic reannotation of mass-bracket modifications (e.g., [+57.0215]) to UniMod accessions (e.g., (UniMod:4)) using an embedded or custom UniMod XML database. New parameters include unimod_annotation, max_delta_unimod, enable_unannotated, and unimod_xml_path for fine control over this behavior. [1] [2] [3] [4] [5] [6] [7]

Configuration and CLI usability:

  • The tool can now be run without a JSON config file; if omitted, sensible defaults are used and parameters can be overridden via CLI flags. This includes improved error messages and documentation updates. [1] [2] [3] [4]
  • Added new CLI and config parameters for UniMod reannotation and improved handling of parameter overrides. [1] [2]

Model architecture and pretrained model paths:

  • Updated documentation and default model architectures to reflect current support (rt_cnn_lstm and ccs_cnn_lstm instead of older LSTM/Transformer models).
  • Changed default paths for pretrained models and constants to new locations, ensuring correct loading of models. [1] [2]

Decoy handling improvements:

  • Decoy peptides now have the decoy_tag (default: "DECOY_") consistently prefixed to ProteinId, UniprotId, and GeneName fields in both TSV and Parquet outputs, making decoy entries easy to identify in downstream analysis. [1] [2] [3] [4] [5]

Other enhancements:

  • Added a helper to clean up N-terminal dashes in peptide sequences after modification tag removal, ensuring clean output.

These changes collectively improve the tool’s flexibility, output clarity, and ease of use.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces UniMod modification reannotation support, improves CLI usability by making config files optional, updates model paths, and enhances decoy handling. The implementation adds a new unimod module that parses the UniMod XML database and converts mass-bracket notation to UniMod accession notation in output files.

Changes:

  • Added UniMod modification reannotation with embedded database support and custom XML file loading
  • Made JSON config file optional for CLI execution, with sensible defaults when omitted
  • Updated default pretrained model paths from nested to flatter directory structure
  • Enhanced decoy handling by consistently prefixing decoy tags to protein IDs, UniProt IDs, and gene names

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
easypqp-core/src/unimod.rs New module implementing UniMod XML parsing and mass-bracket-to-UniMod reannotation
easypqp-core/src/lib.rs Added four new configuration parameters for UniMod reannotation with defaults
easypqp-core/Cargo.toml Added quick-xml dependency for XML parsing
easypqp-cli/src/runner.rs Integrated UniMod database initialization with graceful error handling
easypqp-cli/src/output.rs Applied UniMod reannotation, N-terminal dash cleanup, and decoy tag prefixing to both TSV and Parquet outputs
easypqp-cli/src/input.rs Made config file optional, added UniMod parameter overrides, updated default model paths
easypqp-cli/src/main.rs Changed parameters argument from required to optional in CLI
easypqp-py/src/lib.rs Extended Python binding signature with four new UniMod-related parameters
README.md Documented new UniMod parameters, updated supported architectures, added decoy handling section

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread easypqp-core/src/unimod.rs Outdated
Comment thread easypqp-core/src/unimod.rs Outdated
Comment thread easypqp-cli/src/input.rs
Comment thread easypqp-core/src/unimod.rs Outdated
@singjc
singjc merged commit 59efbd9 into master Feb 19, 2026
2 checks passed
@singjc
singjc deleted the fix/modification_writing branch February 19, 2026 07:38
@singjc
singjc restored the fix/modification_writing branch February 19, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants