BioPhi API

The BioPhi API provides an interface to the BioPhi antibody design platform. BioPhi is an open-source antibody design platform that features methods for automated antibody humanization (Sapiens), humanness evaluation (OASis), and computer-assisted antibody sequence design. The platform is based on antibody repertoires from the Observed Antibody Space and provides tools for antibody optimization and humanization.

The source code and additional documentation can be found on the GitHub page and the publication can be found here.

Command Line Interface

You need to include a FASTA file containing antibody sequences using the --fasta-file flag.

Examples

Evaluate humanness of antibody sequences.

lev engine submit biophi --fasta-file input.fasta --mode humanness

Humanize antibodies using Sapiens method.

lev engine submit biophi --fasta-file input.fasta --mode sapiens --fasta-only true

Perform CDR grafting humanization.

lev engine submit biophi --fasta-file input.fasta --mode cdr_grafting --fasta-only true

Use the designer mode for computer-assisted antibody design.

lev engine submit biophi --fasta-file input.fasta --mode designer

Run multiple iterations with custom numbering scheme.

lev engine submit biophi --fasta-file input.fasta --mode humanness --iterations 3 --scheme kabat

Humanize with custom germline assignments.

lev engine submit biophi --fasta-file input.fasta --mode sapiens \

Run with strict humanness requirements.

lev engine submit biophi --fasta-file input.fasta --mode humanness \
    --min-subjects strict \

Use Sapiens with final pass optimization.

lev engine submit biophi --fasta-file input.fasta --mode sapiens \
    --sapiens-final-pass true \
    --backmutate-vernier false

Flags

  • --fasta-file (str) (Required)
    • Path to input FASTA file containing antibody sequences
    • Both chains of each antibody should have the same ID with optional _VL/_VH or _HC/_LC suffix
  • --mode (str) (Default: humanness)
    • Mode of operation
    • Options:
      • sapiens: Automated antibody humanization using Sapiens method
      • cdr_grafting: CDR grafting humanization approach
      • humanness: Evaluate antibody humanness using OASis
      • designer: Computer-assisted antibody sequence design
  • --fasta-only (bool) (Default: false)
    • Output FASTA only (default: false)
    • When true, returns only the humanized FASTA sequences
  • --iterations (int) (Default: 1)
    • Number of iterations to run of sapiens to run. 3 is suggested. Check figure 5b of the publication for more.
    • Useful for creating more humanized sequences
  • --scheme (str) (Default: kabat)
    • Numbering scheme for antibody sequences
    • Options:
      • kabat: Kabat numbering scheme
      • chothia: Chothia numbering scheme
      • martin: Martin numbering scheme
  • --cdr-definition (str) (Default: kabat)
    • CDR definition method
    • Options:
      • kabat: Kabat CDR definition
      • chothia: Chothia CDR definition
      • martin: Martin CDR definition
  • --humanize-cdrs (bool) (Default: false)
    • Humanize CDRs in addition to framework regions
    • When true, CDRs are also humanized during the process
  • --heavy-v-germline (str) (Default: auto)
    • Heavy chain V germline assignment
    • Use auto for automatic assignment or specify a specific germline (e.g., IGHV1-69)
  • --light-v-germline (str) (Default: auto)
    • Light chain V germline assignment
    • Use auto for automatic assignment or specify a specific germline (e.g., IGLV1-44)
  • --backmutate-vernier (bool) (Default: true)
    • Backmutate vernier positions
    • When true, critical vernier positions are backmutated to maintain binding
  • --sapiens-final-pass (bool) (Default: false)
    • Use Sapiens final pass optimization
    • When true, applies additional Sapiens optimization step
  • --min-subjects (str) (Default: relaxed)
    • Minimum subjects requirement for humanness evaluation
    • Options:
      • relaxed: Relaxed requirements
      • strict: Strict requirements
      • custom: Use custom minimum subjects value
  • --custom-min-subjects (float) (Default: 10.0)
    • Custom minimum subjects value
    • Used when --min-subjects is set to custom

Python Interface

Examples

Evaluate humanness of antibody sequences.

from engine import EngineClient

client = EngineClient()
client.authorize()

job_id = client.submit_biophi(
    input_fasta="input.fasta",
    mode="humanness"
)

# Get results
results = client.get_results(job_id)

Humanize antibodies using Sapiens method.

job_id = client.submit_biophi(
    input_fasta="input.fasta",
    mode="sapiens",
    fasta_only=True,
    iterations=3,
    scheme="kabat",
    humanize_cdrs=False,
    backmutate_vernier=True
)

Perform CDR grafting with custom germline assignments.

job_id = client.submit_biophi(
    input_fasta="input.fasta",
    mode="cdr_grafting",
    heavy_v_germline="IGHV1-69",
    light_v_germline="IGLV1-44",
    humanize_cdrs=True,
    fasta_only=True
)

Use designer mode for antibody design.

job_id = client.submit_biophi(
    input_fasta="input.fasta",
    mode="designer",
    iterations=5,
    scheme="chothia"
)

Run with strict humanness requirements.

job_id = client.submit_biophi(
    input_fasta="input.fasta",
    mode="humanness",
    min_subjects="strict",
    custom_min_subjects=20.0
)

Output Files

The BioPhi API produces different output files depending on the mode:

Sapiens Mode

  • humanized.fa: Humanized antibody sequences in FASTA format

CDR Grafting Mode

  • humanized.fa: Humanized antibody sequences in FASTA format

Humanness Mode

  • antibodies.fa: Processed antibody sequences
  • Humanness.xlsx: Detailed humanness evaluation results

Designer Mode

  • designer_antibodies.fa: Designed antibody sequences
  • Designer.xlsx: Design results and analysis

Modes

Sapiens

The Sapiens mode performs automated antibody humanization using the Sapiens method. This approach uses machine learning to predict human-like sequences while maintaining the binding specificity of the original antibody.

CDR Grafting

The CDR grafting mode performs traditional CDR grafting humanization, where the complementarity-determining regions (CDRs) are grafted onto human framework regions.

Humanness

The humanness mode evaluates the human-likeness of antibody sequences using the OASis database, which contains antibody repertoires from the Observed Antibody Space.

Designer

The designer mode provides computer-assisted antibody sequence design capabilities, allowing for the generation of novel antibody sequences with desired properties.

Input Format

The input FASTA file should contain antibody sequences with the following format:

  • Both chains of each antibody should have the same ID
  • Optional suffixes like _VL/_VH or _HC/_LC can be used to distinguish chains
  • Sequences should be in standard FASTA format

Example:

>antibody1_VH
QVQLVQSGAEVKKPGASVKVSCKASGYTFTSYWMHWVKQRPGQGLEWIGYINPSRGYTNYNQKFKDKATITADESTSTAYMELSSLRSEDTAVYYCAR
>antibody1_VL
DIQMTQSPSSLSASVGDRVTITCRASQSISSYLNWYQQKPGKAPKLLIYAASTLQSGVPSRFSGSGSGTDFTLTISSLQPEDFATYYCQQSYSTPRTFGQGTKVEIK

References

Updated: