Skip to content

Open-Athena/binder-lab

Repository files navigation

binder-lab

Workflow for evaluation of designed protein binders

The goal here is to have a simple workflow for in silico evaluation of designed proteins (focusing on binder design against protein and small molecule targets) generated by various tools.

For now all it does is run Boltz. Later we want to support AF3 and potentially other structure predictors, as well as multiple metrics computed from the predicted structures.

Setup

Prereqs

You will need docker (to build the images) and apptainer (to run them via snakemake) installed.

You can install apptainer on ubuntu with:

sudo apt install -y apptainer

Copy or link AF3 weights

You will need to acquire AF3 weights from Google. Then:

cp /path/to/your/af3.bin.zst resources/af3

Download boltz weights

cd resources/boltz
bash download_resources.sh

Build docker images

docker build -t binder-lab-boltz:latest docker/boltz
docker build -t binder-lab-af3:latest docker/af3
docker build -t binder-lab-metrics:latest docker/metrics

Convert docker images to apptainer

apptainer build resources/boltz/boltz.sif docker-daemon://binder-lab-boltz:latest
apptainer build resources/af3/af3.sif docker-daemon://binder-lab-af3:latest
apptainer build resources/metrics/metrics.sif docker-daemon://binder-lab-metrics:latest

Install the package

pip install -e .

Running

First you need to make a yaml file with your designs.

This step will depend on the method you used to generate designs. As one example, we have a script that will generate a yaml from a directory containing cif files for designs along with npz files with a mask indicating what residues are designed.

DESIGN_DIR=test/data/design_dir_cif_npz/oqo-1
# or:
# DESIGN_DIR=test/data/design_dir_cif_npz/glp1
OUT_DIR=results/$(basename $DESIGN_DIR)
mkdir -p $OUT_DIR
python scripts/ingest_from_design_dir.py $DESIGN_DIR $OUT_DIR/designs.yaml

Take a look at $OUT_DIR/designs.yaml and make sure everything looks right. Then copy a config file that indicates what predictors to run and what metrics to calculate.

cp examples/config1.yaml $OUT_DIR/config.yaml

Now invoke snakemake (the "-nv" is to make GPUs available to apptainer):

snakemake --cores all \
    --use-apptainer \
    --apptainer-args="--nv --bind $(pwd)/resources:/resources" \
    --resources gpu=1 \
    --config workdir=$OUT_DIR

Take a look at results:

cp notebooks/example1.ipynb $OUT_DIR/plots.ipynb
# (load it up in jupyter)

Run unit tests

pytest -sv test/

About

Suite for evaluation of designed protein binders

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published