Skip to content

Conversation

Copy link

Copilot AI commented Oct 25, 2025

Exposes RT, CCS, and MS2 prediction models to Python via PyO3 bindings, enabling Python users to leverage ReDeeM's deep learning models without reimplementation.

Implementation

New crate: redeem-properties-py

  • RTModel: Retention time prediction (rt_cnn_lstm, rt_cnn_tf)
  • CCSModel: Collision cross-section prediction (ccs_cnn_lstm, ccs_cnn_tf)
  • MS2Model: MS2 fragment intensity prediction (ms2_bert)

Key features:

  • Native NumPy array I/O via numpy crate
  • Optional CUDA support through feature flag
  • Maturin-based packaging for pip distribution

Usage

from redeem_properties_py import RTModel

model = RTModel("model.safetensors", "rt_cnn_lstm")
rt_predictions = model.predict(
    sequences=["PEPTIDE", "SEQUENCE"],
    mods=["", ""],
    mod_sites=["", ""]
)

CCS and MS2 models follow the same pattern with additional charge state, NCE, and instrument parameters as needed.

Structure

crates/redeem-properties-py/
├── Cargo.toml          # PyO3 dependencies
├── pyproject.toml      # Maturin build config
├── README.md           # Python-specific docs
└── src/lib.rs          # Python bindings (410 LOC)

Dependencies: PyO3 0.22, numpy 0.22, Python 3.8+

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/lazear/sage/commits/master
    • Triggering command: /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo build --package redeem-properties (http block)
  • https://api.github.com/repos/singjc/gbdt-rs/commits/add/decision_function
    • Triggering command: /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo build --package redeem-properties (http block)
  • https://api.github.com/repos/singjc/rust-xgboost/commits/HEAD
    • Triggering command: /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo build --package redeem-properties (http block)
  • https://api.github.com/repos/singjc/tqdm/commits/add/update_desc
    • Triggering command: /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/cargo build --package redeem-properties (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

I want to create a python crate that exposes some of the peptide property prediction models so that they could be used in python.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Oct 25, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 25, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI and others added 4 commits October 25, 2025 04:30
Co-authored-by: singjc <32938975+singjc@users.noreply.github.com>
Co-authored-by: singjc <32938975+singjc@users.noreply.github.com>
Co-authored-by: singjc <32938975+singjc@users.noreply.github.com>
Co-authored-by: singjc <32938975+singjc@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Python crate for peptide property prediction models Add Python bindings for peptide property prediction models Oct 25, 2025
Copilot AI requested a review from singjc October 25, 2025 04:49
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