Skip to Content

How to design a combinatorial variant library

Design a combinatorial variant library, starting from measurements you have already collected.

This guide shows you how to design a combinatorial variant protein library using multi-property optimization. Use this workflow to execute the Design phase of a lab-in-the-loop DBTL cycle.

You will train Bayesian property predictors on your existing experimental measurements, then search the protein sequence space to select high-performing variants that satisfy your specific design objectives and constraints. For background on Bayesian optimization for library design, see Concepts > Design > Bayesian optimization.

Before starting

You will need:

  • An assay dataset as a csv file
  • A project in the web app, or an authenticated session in a Python client. See Quickstart.

Prepare and upload your dataset

Upload your dataset.

Before uploading, ensure the following:

  • If your measurements span several orders of magnitude, transform or normalize them first. For example, use log Kd instead of raw Kd for binding affinity.
  • If you have replicates, each replicate column in your csv should be named <property name>_<replicate number>. For more information, see How-to > Prepare and upload your dataset.
  • If your sequences differ in length, align them first. See How-to > Align sequences.

Train specialized property predictors

Train GP predictors

Train a Gaussian Process (GP) predictor for each property that you want to optimize. To train a GP predictor, you will need to specify the following:

  • Properties: Select all properties that you wish to optimize. You may select more than one property. A single model will be trained per property that you select.
  • Embedding Model: We support a wide range of open source models. We recommend using PoET-2 as your embedding model. If you choose PoET-2, you should provide a Prompt that is tailored to your dataset. For human antibody datasets, use the system human VH/VL prompt. Otherwise, build one using homology search. For a detailed guide, please see How-to > Build a custom prompt. To learn more about PoET-2's powerful prompting system, please see Concepts > Prompts.
  • Reduction Type: For fixed-length sequences, we recommend that you use SVD. For variable-length sequences, select between the mean or sum.
  • Kernel Type: You can also specify the Kernel Type and other GP parameters. For more details, see Concepts > Models > Property Predictors.

On the Dataset page, go to Train Model.

(Optional) Name your predictor and give it a description.

Select the Properties that you wish to train your model on.

Select the Kernel Type. By default, this is set to RBF, or the Radial Basis Function.

Select an Embedding Model. If you choose PoET-2 as your model, you may optionally provide a Prompt, which is comprised of a Query and Context. If your dataset is a human antibody dataset, the system will recommend PoET-2 with the system human VH/VL prompt by default.

Configure the Embeddings Settings.

Click on Run to start training your model

Tips & Tricks

Different configurations can lead to different model performance. To select the best model for design, we recommend training additional models with different configurations to see how performance varies with different embedding models or GP hyperparameters.

Inspect the trained predictor

To understand how to interpret these training metrics, see Concepts > Models > Evaluating models.

Inspect the training losses on the Training tab. Check that the model has converged.

Inspect model performance and calibration on the Cross Validation tab.

You can also quickly compare results across different models by navigating to the Models page in your project and clicking on Filter to filter by dataset.

Design a combinatorial variant library

To design a combinatorial variant library using your property predictors, you will first need to specify a set of design objectives, and a set of design constraints.

Specify design objectives

A design can have one or more objectives, which you can think of as your design goals. Each objective is defined by one or more criteria. Within an objective, the solver will search for sequences that meet every criterion for that objective. Across objectives, the solver will return solutions across the Pareto front that trade off between them. For background, see Concepts > Design > Bayesian optimization.

The number of mutations is a special criterion. Add it as a separate objective to see how other properties trade off against the number of mutations.

Tips & Tricks

To explore the trade-off between safer and riskier designs, add criteria of different stringency on the same predictor as separate objectives.

On the Dataset page, click on Create Design

(Optional) Name your design and give it a description.

For each Design objective, add one or more Criterion. Each criterion is defined by a predictor, and a target value.

(Optional) Check Use number of mutations criteria to search for solutions that trade-off with the number of mutations

Specify design constraints

By default, all substitutions are allowed at all positions. To set design constraints, specify the set of amino acids allowed at each site.

To enable custom design constraints, first check Enable custom design constraints.

Specify the set of amino acids allowed at each site

  • To allow only a particular amino acid at a given site, highlight the site and type the amino acid symbol
  • For more advanced options, click on Add Rule. To add a rule, specify the rule type (Allow, Do not allow or Allow only) and the amino acid code(s). For convenience, you may also choose between different categories of amino acids, such as positively or negatively charged amino acids, and polar or non-polar amino acids.

Design sequences

Design new sequences based on your objectives and constraints using a genetic algorithm.

(Optional) Set the number of design steps or the number of sequences per design step. These are set to 25 and 1024 respectively by default.

Click on Create Design.

Inspect designs

Inspect your designs before filtering them to obtain a final library. Looking at metrics such as the expected number of successes and the predicted outcome distribution for each objective will help you to make informed decisions about how to select your final library. For more information, see Concepts > Design > Bayesian optimization.

Inspect your designs using the Predicted Library Performance panel at the top.

(Optional) Add a reference sequence under Table Settings > Reference Sequence to add columns for the mutations and number of mutations with respect to a reference sequence.

(Optional) Click on Filters on the right panel to apply various filters. The Predicted Library Performance will update automatically to reflect changes in the performance metrics after filtering.

Warning: Low probability of success

In the app, you may receive a notification that ‘The probability of success is less than 2% for at least one design criterion’. If you receive this notification, check if your design criteria was mis-specified. If it is correct, select Generate more sequences to continue running the design algorithm. If no improved sequences are discovered, consider relaxing the design objectives or design constraints.

Warning: High probability of success

In the app, you may receive a notification that ‘The probability of success exceeds 98% for at least one design criteria’. If you receive this notification, check if your design criteria was mis-specified. If it is correct, consider increasing the stringency of the design objectives or design constraints.

Next steps

On this page