Skip to content
SUwonglabPublic

About

ProVADA: conditional variant generation via ensemble-guided test-time steering

Resources

Stars

7 stars

Watchers

0 watching

Forks

Repository files navigation

ProVADA

Generative steering to adapt proteins beyond native biological contexts

Unit Tests Lint Check License: MIT Python 3.12+ Preprint Built on proto-tools

Preprint · Renin example

Xiaowei Zhang1,†,, Wenhui Sophia Lu2,†, Ben Viggiano3,4,†, Kevin Reynolds5, Sophia Burick6, Elena Sotillo5,7, Haoyu Dai8, Geonhu Lee8, Zixuan Liu1, Nuoya Yang9, Luis S. Mille-Fragoso1,16, Euan Ashley3,10,11, Bingfei Yu9,12,13, Crystal L. Mackall5,7,10,14,15, Wing Hung Wong2,3,16,, Xiaojing J. Gao8,16,*

Affiliations
1 Department of Bioengineering, Stanford University, Stanford, USA.
2 Department of Statistics, Stanford University, Stanford, USA.
3 Department of Biomedical Data Science, Stanford University, Stanford, USA.
4 Department of Computer Science, Stanford University, Stanford, USA.
5 Stanford Center for Cancer Cell Therapy, Stanford Cancer Institute, Stanford University, Stanford, USA.
6 Biophysics Program, Stanford University, Stanford, USA.
7 Weill West Coast Cancer Hub, Stanford, USA.
8 Department of Chemical Engineering, Stanford University, Stanford, USA.
9 Department of Immunology and Immune Therapeutics, Keck School of Medicine, University of Southern California, Los Angeles, USA.
10 Department of Medicine, Stanford University, Stanford, USA.
11 Center for Undiagnosed Diseases, Stanford University, Stanford, USA.
12 Norris Comprehensive Cancer Center, University of Southern California, Los Angeles, USA.
13 Alfred E. Mann Department of Biomedical Engineering, University of Southern California, Los Angeles, USA.
14 Department of Pediatrics, Stanford University, Stanford, USA.
15 Parker Institute for Cancer Immunotherapy, San Francisco, USA.
16 Stanford Bio-X, Stanford University, Stanford, USA.
† These authors contributed equally to this work.
* Corresponding authors: xjgao@stanford.edu (X.J.G.), whwong@stanford.edu (W.H.W.), zhangxw@stanford.edu (X.Z.)

 

ProVADA overview

This repository contains the official implementation of ProVADA (Protein Variant Adaptation), a test-time framework for adapting existing proteins to new biological contexts. Starting from a reference sequence, ProVADA steers a pretrained protein generator toward desired properties while preserving fold and native functionality.

Publications

What is ProVADA?

At its core, ProVADA uses an iterative, population-based sampling algorithm called MADA (Mixture-Adaptation Directed Annealing) to explore the protein sequence space. At each iteration, promising sequences are selected through a downsampling and upsampling process, partially masked, and then re-completed to generate new proposals. These proposals are accepted or rejected based on a fitness score, guiding the population toward the desired properties.

See the sampler documentation for sampling policies, fitness options, and the metrics a run logs.

ProVADA MADA Algorithm Overview

An illustrated example of the MADA algorithm utilizing ProteinMPNN as a generator.

Set up

We have created a start up script that installs all dependencies and sets up the conda environment provada-env. Please use the following commands to create and activate the environment:

bash create_env.sh
conda activate provada-env

Example

We have provided example inputs for the experiments in the preprint under the inputs directory. Each has its own README describing the target, the files and what the configuration optimizes.

Renin localization: inputs/renin

Adapt a secreted protease to the reducing cytosol.

python run_provada.py --config inputs/renin/renin_localization_mpnn.yaml

FMC63 deimmunization: inputs/fmc63

Lower predicted MHC class I presentation of the anti-CD19 CAR binder.

python run_provada.py --config inputs/fmc63/fmc63_deimmune_mpnn.yaml

SunTag scFv deimmunization: inputs/scfvgcn4

The same objective for the second scFv, excluding new cysteines.

python run_provada.py --config inputs/scfvgcn4/scfvgcn4_deimmunize_mpnn.yaml

Both deimmunization examples predict epitopes with netMHCpan, which is license-gated and has to be installed once before they will run.

Repository Structure

provada-dev/
├── provada/                    # Main package source code
│   ├── components/            # Core components: Evaluators, Generators
│   │   ├── README.md          # Component system overview
│   │   ├── EVALUATORS.md      # Guide to creating custom scoring functions
│   │   ├── GENERATORS.md      # Guide to creating custom sequence generators
│   │   ├── evaluator.py       # Evaluator base class and built-in evaluators
│   │   └── generator.py       # Generator base class and built-in generators
│   ├── sampler/               # Sampling algorithms (MADA, Rejection, etc.)
│   ├── sequences/             # Sequence processing and pairwise metrics
│   ├── tools/                 # Model toolkits, each run in an isolated environment
│   ├── utils/                 # Utilities (logging, config, registry, etc.)
│   ├── base_variant.py        # Base variant class for starting protein
│   ├── config.py              # Typed configuration schema
│   ├── paths.py               # Path configuration
│   └── README.md              # Package-level documentation
├── inputs/                    # Input files and configurations
│   └── renin/                 # Example: renin localization experiment
├── tests/                     # Test suite
├── results/                   # Output directory for experimental results
├── logs/                      # Application logs
├── wandb/                     # Weights & Biases experiment tracking
├── run_provada.py             # Main entry point for running experiments
├── run_multiple.py            # Run multiple experiments in parallel (multi-GPU)
└── conftest.py                # Pytest configuration

Core Components

ProVADA's modular design is built around two extensible component types:

  • Evaluators - Score protein sequences based on desired properties (localization, stability, etc.)
  • Generators - Generate new sequences by filling masked positions (ESM3, ProteinMPNN, etc.)

See the Components README for detailed guides on creating custom evaluators and generators. In addition, our repository builds on the open-source infrastructure of the proto-tools project. See the proto-tools documentation for more information on how our model deployments work.

Tests

To run tests to ensure all functionality works, use the following command:

pytest -sv

About

ProVADA: conditional variant generation via ensemble-guided test-time steering

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages