{"id":23469,"library":"crested","title":"CREsted","description":"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.","status":"active","version":"1.8.1","language":"python","source_language":"en","source_url":"https://github.com/aertslab/crested","tags":["genomics","deep learning","regulatory genomics","sequence models","borzoi","chrombpnet","dilated cnn"],"install":[{"cmd":"pip install crested","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for model training and prediction","package":"torch","optional":true},{"reason":"Required for TensorFlow backend models","package":"tensorflow","optional":true}],"imports":[{"note":"Main import, top-level module.","wrong":"","symbol":"crested","correct":"import crested"},{"note":"Training and inference module. Triggers backend load.","wrong":"","symbol":"crested.tl","correct":"import crested.tl"},{"note":"Preprocessing module.","wrong":"","symbol":"crested.pp","correct":"import crested.pp"},{"note":"Plotting module, reorganized in v1.7.0.","wrong":"","symbol":"crested.pl","correct":"import crested.pl"},{"note":"Genome class for sequence loading.","wrong":"crested.Genome()","symbol":"crested.Genome","correct":"from crested import Genome"}],"quickstart":{"code":"import crested\n\n# Load a pretrained model from the repository\nmodel = crested.pp.load_model('BorzoiHuman')\n\n# Create a simple AnnData object with a genomic region\ndata = crested.pp.example_data()\n\n# Make predictions\ncrested.tl.predict(model, data)\n\n# Inspect predictions\nprint(data.obs.head())","lang":"python","description":"Minimal example to load a pretrained model, create test data, and run predictions."},"warnings":[{"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","message":"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.","severity":"breaking","affected_versions":">=1.7.0"},{"fix":"Use `DilatedCNN` instead of `Chrombpnet` when specifying model architecture.","message":"The `Chrombpnet` architecture was renamed to `DilatedCNN` in v1.4.0. The old name still works but is deprecated.","severity":"deprecated","affected_versions":">=1.4.0"},{"fix":"Install either torch or tensorflow before using `crested.tl`.","message":"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.","severity":"gotcha","affected_versions":">=1.6.0"},{"fix":"Use Python 3.11-3.13. Check with `python --version`.","message":"Python version requirement: `crested` requires Python 3.11, 3.12, or 3.13. Installing on 3.10 or 3.14+ will fail.","severity":"gotcha","affected_versions":">=1.6.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install torch (`pip install torch`) or tensorflow (`pip install tensorflow`). Then use `import 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.","error":"ModuleNotFoundError: No module named 'crested.tl'"},{"fix":"Use `crested.pl.explain.contribution_scores` instead.","cause":"Since v1.7.0, the function was moved to `crested.pl.explain.contribution_scores`.","error":"AttributeError: module 'crested.pl' has no attribute 'contribution_scores'"},{"fix":"Install tensorflow: `pip install tensorflow`.","cause":"Some pretrained models (e.g., Borzoi) were trained with TensorFlow and require it for prediction.","error":"ValueError: This model requires a TensorFlow backend, but TensorFlow is not installed."},{"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)`.","cause":"Common when mixing CPU and GPU tensors during prediction. Often due to not moving input data to the model's device.","error":"RuntimeError: Expected all tensors to be on the same device"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}