aikixp-client
Official Python client for the Aiki-XP bacterial protein-expression prediction API.
Aiki-XP is a leakage-controlled multimodal model trained on 492,026 genes from 385 bacterial species; it predicts within-species relative protein expression (per-species z-score). See the paper and main repository for background.
Install
pip install aikixp-client
Python ≥ 3.9. The only dependency is requests.
Quick start
from aikixp_client import Client
client = Client()
# --- Tier A: protein only, no host required (fastest) --------------
r = client.predict_tier_a("MKTVRQERLKSIVRILERSKEPVSGAQLAEELSVSRQVIVQDIAYLRSLGYNIVATPRGYVLAGGPGLGLNHVGQIIR")
print(r["predictions"][0]["predicted_expression"]) # e.g. -0.083
# --- Tier D: full 9-modality, A100 (GPU) --------------------------
r = client.predict_tier_d(
protein="MKT...",
cds="ATG...TAA",
host="NC_000913.3",
mode="native",
)
print(r["predictions"][0]["predicted_expression"])
print(r["modalities_filled"]) # ['evo2_7b_full_operon_pca4096', 'hyenadna_dna_cds', ...]
# --- Look up a gene in the 244K held-out CV corpus ----------------
g = client.lookup_gene("Escherichia_coli_K12|NP_417556.2")
row = g["results"][0]
print(row["tier_d"], row["true_expression"], row["cv_fold"])
# --- Reproduce the paper's numbers on a fresh random sample -------
sample = client.sample_lookup(n=5000, seed=42)
# --- Compare all 5 tiers on the same sequence, in parallel --------
results = client.compare_all_tiers(
protein="MKT...",
cds="ATG...TAA",
host="NC_000913.3",
mode="native",
)
for tier in ("A", "B", "B+", "C", "D"):
print(tier, results[tier]["predictions"][0]["predicted_expression"])
Auto-fill a CDS from a protein + host
r = client.cds_for_protein(
protein="MAKPIL...",
host="NC_000913.3",
)
print(r["cds"], r["source"]) # "ATG...", "native" or "codon_optimized"
Host catalog
hosts = client.hosts() # 1,831 bacterial reference genomes
print(f"{len(hosts)} hosts cached")
e_coli = [h for h in hosts if h["acc"] == "NC_000913.3"][0]
print(e_coli["name"], e_coli["n_test"])
Error handling
All HTTP errors raise :class:AikixpError with the status code and response body.
from aikixp_client import Client, AikixpError
try:
client.predict_tier_d(...)
except AikixpError as e:
if e.status in (502, 504):
# Cold-start timeout; retry after a short delay
...
else:
raise
Tiers at a glance
| Tier | Modalities | Hardware | Cold | Warm | ρ_non-conserved |
|---|---|---|---|---|---|
| A | ESM-C + ProtT5 (protein only) | CPU | ~33 s | ~15 s | 0.518 |
| B | + HyenaDNA + classical | A100-40 GB | ~44 s | ~6 s | 0.531 |
| B+ | + Evo-2 7B init-window + RNA init | A100-40 GB | ~79 s | ~10 s | 0.543 |
| C | + Evo-2 7B full operon | A100-40 GB | ~8 s | ~7 s | 0.575 |
| D | + Bacformer-large + operon structure | A100-80 GB | ~6 s | ~5 s | 0.590 |
Gotchas
- The server scales to zero after ~5 minutes of idle — first calls after a quiet period cold-start a fresh GPU container. Default timeouts account for this (120 s for CPU endpoints, 1200 s for GPU endpoints).
- Tagged sequences (His6, HiBit, FLAG, etc.) are out-of-distribution. Strip
tags first using
aikixp.sequence_normalizationfrom the main repo. - Native mode requires the user-supplied CDS to exact-substring-match the host
genome; if it doesn't, the server silently falls back to heterologous mode
with the lacZ anchor. The response's
predictions[0]["operon_source"]field tells you which path was taken.
License
Code: Apache 2.0. Aiki-XP model weights + data: CC-BY 4.0 (via Zenodo).
Citation
@article{tien2026aikixp,
title = {Aiki-XP: leakage-controlled multimodal prediction of within-species
relative protein expression at pan-bacterial scale},
author = {Tien, Hudson and Sharma Meda, Radheesh and Shastry, Shankar and
Mysore, Venkatesh},
journal = {Nature Biotechnology},
year = {2026},
note = {Under review. Preprint on bioRxiv.}
}
Metadata
Release files for aikixp-client 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aikixp_client-1.0.0.tar.gz | 9.1 kB | Without provenance | Details for aikixp_client-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aikixp_client-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for aikixp_client-1.0.0-py3-none-any.whl |
Total release size: 19.0 kB
Release files / aikixp_client-1.0.0.tar.gz
| Download URL | aikixp_client-1.0.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86c1981e60e1403d7aa56f73656d4b208f0133abaf84491a4558ba37b5cd6681
|
|
BLAKE2b-256 checksum How to use checksums |
211259ad63bd9460c4f1aa2df760184983a7e7080caa660a66624c62f5956027
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.9
|
Release files / aikixp_client-1.0.0-py3-none-any.whl
| Download URL | aikixp_client-1.0.0-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e88ecb3d3d8208018aef37056d54c2f1ffa269f6e1f29565fc21947c41dec300
|
|
BLAKE2b-256 checksum How to use checksums |
abf2543bf6c2f39939f56e39aac829f770ba15ec6eac7d8b2a7b924b95ab483c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.9
|
Security for aikixp-client 1.0.0
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.