CREsted
raw JSON → 1.8.1 verified Fri May 01 auth: no python
CREsted (Cis-Regulatory Element Sequence Training, Explanation, and Design) is a Python library for deep learning on regulatory genomics. It provides tools for training, interpreting, and designing genomic models, with support for popular architectures like Borzoi and DilatedCNN. Current version is 1.8.1, released on 2026-03-19. Requires Python 3.11 - 3.13. Released under MIT license.
pip install crested Common errors
error ModuleNotFoundError: No module named 'crested.tl' ↓
cause `crested.tl` is only imported when accessed; it requires a backend (torch or tensorflow). This error occurs if you try to import it directly without having installed the backend.
fix
Install torch (
pip install torch) or tensorflow (pip install tensorflow). Then use import crested.tl. error AttributeError: module 'crested.pl' has no attribute 'contribution_scores' ↓
cause Since v1.7.0, the function was moved to `crested.pl.explain.contribution_scores`.
fix
Use
crested.pl.explain.contribution_scores instead. error ValueError: This model requires a TensorFlow backend, but TensorFlow is not installed. ↓
cause Some pretrained models (e.g., Borzoi) were trained with TensorFlow and require it for prediction.
fix
Install tensorflow:
pip install tensorflow. error RuntimeError: Expected all tensors to be on the same device ↓
cause Common when mixing CPU and GPU tensors during prediction. Often due to not moving input data to the model's device.
fix
Ensure input AnnData object's
.X is on the same device as the model: model.to(device) and data.X = data.X.to(device). Warnings
breaking In v1.7.0, the `crested.pl` module was reorganized. Old function names like `crested.pl.contribution_scores` are deprecated in favor of `crested.pl.explain.contribution_scores`. Old names still work as aliases but will be removed in a future version. ↓
fix Update imports: use `crested.pl.explain.contribution_scores` instead of `crested.pl.contribution_scores`. See https://github.com/aertslab/CREsted/blob/main/docs/api/renaming.md
deprecated The `Chrombpnet` architecture was renamed to `DilatedCNN` in v1.4.0. The old name still works but is deprecated. ↓
fix Use `DilatedCNN` instead of `Chrombpnet` when specifying model architecture.
gotcha Lazy imports: `crested` does not require torch or tensorflow for import of submodules `pp`, `io`, `datasets`, `pl`. However, `crested.tl` will raise an error if no backend is installed. This is intentional but can confuse first-time users. ↓
fix Install either torch or tensorflow before using `crested.tl`.
gotcha Python version requirement: `crested` requires Python 3.11, 3.12, or 3.13. Installing on 3.10 or 3.14+ will fail. ↓
fix Use Python 3.11-3.13. Check with `python --version`.
Imports
- crested
import crested - crested.tl
import crested.tl - crested.pp
import crested.pp - crested.pl
import crested.pl - crested.Genome wrong
crested.Genome()correctfrom crested import Genome
Quickstart
import crested
# Load a pretrained model from the repository
model = crested.pp.load_model('BorzoiHuman')
# Create a simple AnnData object with a genomic region
data = crested.pp.example_data()
# Make predictions
crested.tl.predict(model, data)
# Inspect predictions
print(data.obs.head())