Skip to main content

xiRT — retention-time prediction

Retention-time prediction for linear and crosslinked peptides.
Modification-aware sequences. Shared recurrent encoders. PyTorch on CPU or CUDA.

Documentation · Quick start · Notebooks · Benchmarks · PyPI

What xiRT does

xiRT learns peptide embeddings and predicts continuous retention times or fraction labels. Crosslinked peptides share a recurrent encoder between their two sequence branches; linear peptides use a single input. Train a model for your experiment, use a saved checkpoint for prediction, or adapt a recurrent model with full fine-tuning, a frozen encoder, LoKr, or LoRA.

Install

Requires Python 3.12–3.14. The PyPI distribution is xirt-torch; the Python import and command remain xirt.

pip install xirt-torch

Generate the two configuration files, then edit their input columns and targets before training:

xirt -p xirt_params.yaml -s learning_params.yaml
xirt -i psms.csv -o results -x xirt_params.yaml -l learning_params.yaml

For a locked source installation, clone this repository and run uv sync --locked --extra cpu (or --extra cuda), then prefix the commands with uv run --no-sync. See installation and CLI for backend selection and optional tracking, TensorBoard, Lion, and ESM-C extras.

Learn with real peptide data

Two CPU notebooks use 2,048 observed peptide pairs:

Notebook Covers
Train and predict Prepare inputs, train a model, save a checkpoint, and predict retention times
Fine-tune a model Compare full, frozen-encoder, GRU-LoKr, and GRU-LoRA fine-tuning

From the source checkout:

uv run --no-sync marimo edit examples/train_predict.py --host 127.0.0.1
uv run --no-sync marimo edit examples/fine_tune.py --host 127.0.0.1

make examples executes both without a notebook server. Training uses up to 150 epochs with validation-based early stopping. The fine-tuning guide covers checkpoint compatibility, the Python API, and YAML settings.

Results and compatibility

The benchmark documentation links protocols, predictions, checkpoint provenance, and plots. PyTorch had lower mean held-out RMSE than TensorFlow on two of five evaluated cohorts, not all five. Full fine-tuning had the lowest mean RMSE among the four native fine-tuning strategies on all five cohorts under the fixed comparison protocol.

Upgrading from 1.x: TensorFlow is no longer an application dependency or supported backend, and xiRT 2.0 cannot load Keras .h5 models. See the migration guide. Historical artifacts remain in benchmark-tf-torch/<cohort>/results/.

Development

make sync
make check
make build

pixi run sync bootstraps the same locked uv environment. make help lists documentation, notebook, test and release commands. Benchmark code lives in xirt/data_pipelines/benchmarks/ and is excluded from the production wheel.

Configuration · Migration · Python API · Development

Citation

Giese, S.H., Sinn, L.R., Wegner, F. et al. Retention time prediction using neural networks increases identifications in crosslinking mass spectrometry. Nature Communications 12, 3237 (2021). DOI: 10.1038/s41467-021-23441-0

Contributors: Sven Giese and Ludwig Sinn.

Metadata

Release files for xirt-torch 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xirt-torch 2.0.1
File Size Uploaded Provenance
xirt_torch-2.0.1.tar.gz 1.1 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for xirt-torch 2.0.1
File Interpreter ABI Platform
xirt_torch-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / xirt_torch-2.0.1.tar.gz

Download URL xirt_torch-2.0.1.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
fc41166484d76d649a6c017380da04202cd30dcc6252c6e358e11aa248f7d8b5
BLAKE2b-256 checksum
How to use checksums
9ec932239682e18c0693c712c2d71fd2e6fbd0892ff3530dc5adfb593ee2c0ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / xirt_torch-2.0.1-py3-none-any.whl

Download URL xirt_torch-2.0.1-py3-none-any.whl
Size 68.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc3f0851ae19db380285f3b83e2af68b454c66fca8d626c097db0dffccf91b47
BLAKE2b-256 checksum
How to use checksums
154bb91bcb644e964fa63c992f78ac1d294506dc435719658a527ae276e72a9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for xirt-torch 2.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page