Skip to main content

nativeready

Python SDK for the NativeReady API. Predict whether a protein sequence is likely to give usable native mass spectrometry data, in seconds.

pip install nativeready

Quick start

from nativeready import predict

result = predict("MQIFVKTLTGKTITLEVEPSDTIENVKAKIQDKEGIPPDQQRLIFAGKQLEDGRTLSDYNIQKESTLHLVLRLRGG")
print(result)
# PredictionResult(score=97, label='Excellent', ci=[88-100], model='0.4-esm2-glyco-tm')

print(result.score)         # 97
print(result.label)         # 'Excellent'
print(result.is_ood)        # False
print(result.recommendations)

Common use cases

Predict from a FASTA file

from nativeready import Client

client = Client()
results = client.predict_fasta("my_proteins.fasta")
for r in results:
    print(r.uniprot_id, r.score, r.label)

Predict from a UniProt accession

from nativeready import Client

client = Client()
result = client.predict_uniprot("P00918")  # Carbonic anhydrase 2
print(result.score, result.label)

Batch prediction with progress bar

from nativeready import Client

client = Client()
sequences = [
    {"id": "ubiquitin", "sequence": "MQIFVKTLTGKTITLEV..."},
    {"id": "lysozyme",  "sequence": "KVFGRCELAAAMKR..."},
    "MSHHWGYGKHNGPEHWHKDF...",  # raw string also works
]
results = client.predict_batch(sequences)  # tqdm progress bar if installed

Report a real outcome (close the loop)

Predictions are only half the story. When you actually run a protein on the instrument, report back what happened. Real outcomes, especially failures, are the data the model cannot get from the literature, and every one you send makes the model better for the whole community.

from nativeready import Client

client = Client()
r = client.predict("MQIFVKTLTGKTITLEV...")

# ...you run it on the instrument, and it fails to give resolvable signal...
client.report_outcome(
    "MQIFVKTLTGKTITLEV...",
    r.score,
    "failed",                       # "worked" | "failed" | "not_tested"
    note="200 mM AmAc pH 7.5, Q Exactive UHMR, no resolvable charge series",
    model_version=r.model_version,  # ties the outcome to the model that predicted it
)

The sequence is hashed before storage; the raw protein is never stored server-side. Aggregate community outcomes are visible via client.feedback_stats().

Pandas DataFrame output (with pandas extra)

pip install nativeready[pandas]
import pandas as pd
from nativeready import Client

client = Client()
results = client.predict_fasta("my_proteins.fasta")
df = pd.DataFrame([r.as_dict() for r in results])
df.to_csv("results.csv", index=False)

Command line interface

The package installs a nativeready CLI:

# Single sequence
nativeready predict --sequence "MQIFVKTLTGKTITLEV..."

# UniProt accession
nativeready predict --uniprot P00918

# Multiple UniProt accessions (comma-separated)
nativeready predict --uniprot P00918,P0CG48,P00698

# FASTA file with CSV output
nativeready predict --fasta proteins.fasta --output results.csv

# FASTA file with JSON output
nativeready predict --fasta proteins.fasta --output results.json

# Health check
nativeready health

# Public feedback statistics
nativeready stats

What the predictions mean

Each PredictionResult contains:

  • score — calibrated suitability score, 0 to 100
  • label — Excellent (>= 80), Good (>= 65), Fair (>= 50), Poor (>= 35), Unsuitable (< 35)
  • confidence_lower, confidence_upper — 95 percent confidence interval (wider when out-of-distribution)
  • is_ood — True if the sequence is unusual relative to training data; trust the score with extra caution
  • risk_factors — per-feature risk levels (length, MW, hydrophobicity, pI, instability, cysteine content)
  • recommendations — buffer choice, sample-prep guidance, and instrument-mode notes
  • model_version — server-side model identifier (e.g., 0.4-esm2-glyco-tm)

API server

By default the SDK calls https://nativeready-production.up.railway.app. To use a self-hosted or local deployment:

from nativeready import Client
client = Client(base_url="http://localhost:8000")

Honest scope

NativeReady is currently most reliable as a positive-suitability triage tool, not a validated failure detector. With only two evidence-based real-failure records in the training set, the negative-class performance is not yet statistically meaningful. High-confidence positive predictions can be trusted; low-confidence predictions should be treated as a flag for manual review, not a verdict. See the bioRxiv preprint for full methodology and limitations.

Citing

Znabu BFZ, Atif Z. NativeReady: an open benchmark and sequence-based triage
model for native mass spectrometry suitability. bioRxiv, 2026.
https://doi.org/10.64898/2026.05.03.722506

License

MIT. See LICENSE.

Metadata

Release files for nativeready 0.4.2

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

Source distribution (sdist)

Source distribution for nativeready 0.4.2
File Size Uploaded Provenance
nativeready-0.4.2.tar.gz 13.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nativeready 0.4.2
File Interpreter ABI Platform
nativeready-0.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 27.2 kB

Release files / nativeready-0.4.2.tar.gz

Download URL nativeready-0.4.2.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f582e0b586c47fd7fbbc01b364595f34c9d7c2e4fad9df3e3731ef37f50e0ae1
BLAKE2b-256 checksum
How to use checksums
a2d9c05bbc63edf39edbc4a63a75bba55653daa64c18ef6c6217b7786226a60b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / nativeready-0.4.2-py3-none-any.whl

Download URL nativeready-0.4.2-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6c7e56d3bc4c09735d459cd97ef1a889a4969966a560e77786d592eeb5a24c5
BLAKE2b-256 checksum
How to use checksums
bae924f6f2cc68d9b8ba5e99a7e0c28144417790f7854789f1bd94990902ba23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for nativeready 0.4.2

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.

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