-
Notifications
You must be signed in to change notification settings - Fork 0
1. Installation
This guide explains how to set up RiSPICE for either running the workflow or contributing to the project.
RiSPICE requires three external resources: the trained models used for prediction, the Nipponbare reference genome for sequence generation, and the empirical background distribution for statistical significance testing.
RiSPICE builds upon DNABERT-2-117M. We provide the RiSPICE Base model together with LoRA adapters for different input sequence lengths, all hosted on Hugging Face.
-
RiSPICE Base:
paolomanlapaz/rispice-base -
1000 bp Adapter:
paolomanlapaz/rispice-1000bp -
750 bp Adapter:
paolomanlapaz/rispice-750bp -
500 bp Adapter:
paolomanlapaz/rispice-500bp
Download the RiSPICE Base model together with the desired LoRA adapter. The model repositories can be downloaded directly from the Hugging Face website, cloned with Git, or retrieved using the Hugging Face CLI.
RiSPICE generates reference and alternate allele sequences from the IRGSP-1.0 Nipponbare reference genome. Download the GenBank assembly and note its location for use in subsequent workflows.
The empirical background distribution is used to determine the statistical significance of Overall and Per-Feature Scores. Download the archive matching the adapter you selected.
DOI: https://doi.org/10.5281/zenodo.21639098
| Adapter | Background Distribution |
|---|---|
| 1000 bp | background-dist-1000bp.zip |
| 750 bp | background-dist-750bp.zip |
| 500 bp | background-dist-500bp.zip |
If you only plan to run the RiSPICE workflow, Docker provides the simplest setup. The prebuilt images include all required dependencies, so no manual Python environment is needed.
Install Docker on your system.
Pull the image that matches your hardware configuration.
docker pull ghcr.io/bioinfodlsu/rispice-cuda:latestdocker pull ghcr.io/bioinfodlsu/rispice-cpu:latestModify the
tagif you want a specific version (i.e.rispice-cuda:v0.1.0).
Launch an interactive shell inside the container while mounting your local data, models, analysis, and figures directories.
docker run --rm -it \
--gpus all \
-v <DATA_DIR>:/workspace/.data \
-v <MODELS_DIR>:/workspace/.models \
-v <ANALYSIS_DIR>:/workspace/.analysis \
-v <FIGURES_DIR>:/workspace/.figures \
ghcr.io/bioinfodlsu/rispice-cuda:latest \
bashThe mounted directories allow the container to read your input data and models while writing analysis results and figures directly to your local machine.
Notes Omit the
--gpusall argument when using the CPU image. Replace the placeholder directories with paths on your local machine.
Contributors can either create a local Python environment for development or use Docker to obtain a reproducible development environment.
Clone the RiSPICE repository to your local machine.
A virtual environment allows you to modify and run the source code directly on your system.
python -m venv .venv
source .venv/bin/activateInstall the PyTorch build appropriate for your hardware before installing the remaining project dependencies.
CUDA (GPU):
python -m pip install --upgrade pip
pip install torch==2.10.0+cu128 --index-url https://download.pytorch.org/whl/cu128For CPU-only systems, install:
pip install torch==2.10.0 --index-url https://download.pytorch.org/whl/cpu
Install the Python packages required to develop and run RiSPICE.
pip install -r requirements.txtTo reproduce the original development environment, install
requirements/frozen-cuda.txtorrequirements/frozen-cpu.txtinstead.
Docker Compose builds local development images and mounts the repository into the container, allowing you to edit the source code from your host machine.
docker compose -f docker/compose.yml buildNotes
- This builds the local
rispice-cudaandrispice-cpuimages.- Append
rispice-cudaorrispice-cputo build only a single image.- The Docker Compose configuration mounts the entire repository into the container for development.
Start an interactive shell inside the development container.
docker compose -f docker/compose.yml run \
--rm \
rispice-cuda \
bashReplace
rispice-cudawithrispice-cpuwhen using the CPU image.