Installation¶
Requirements¶
- Python 3.8 or newer
- TensorFlow 2.13 (installed by the extras below) for anything that runs the model
- A GPU is optional. Prediction is fast on CPU; contribution maps mutate every position of a 1,344 bp window, so a GPU makes them noticeably quicker.
Install¶
Pick the extras for what you actually need — the base install pulls in only
numpy and pandas.
| Extra | Adds | Needed for |
|---|---|---|
prediction |
tensorflow-cpu |
predict_celltypes, everything below |
attribution |
matplotlib, logomaker |
compute_attribution, plot_attribution |
variant |
pysam |
score_variants from a genome FASTA |
synergy |
scipy |
MotifSynergyTester |
hub |
huggingface_hub |
automatic download of model weights |
all |
all of the above |
GPU builds
The extras install tensorflow-cpu so that a CPU-only install stays small.
For GPU, install TensorFlow yourself first (pip install tensorflow==2.13.1
inside a CUDA-enabled environment), then
pip install --no-deps peagent-tool plus the remaining extras.
From source¶
git clone https://github.com/YAOJ-bioin/peagent_tool.git
cd peagent_tool
pip install -e ".[all,test]"
pytest
Verify¶
peagent-tool assets reports where the model weights and cell-group metadata
will be read from, and whether they are already present. If they are not, see
Models and data.
The package name is peagent-tool; the Python import is peagent_tool.