Code Monkey home page Code Monkey logo

deepab's Introduction

DeepAb

Official repository for DeepAb: Antibody structure prediction using interpretable deep learning. The code, data, and weights for this work are made available under the Rosetta-DL license as part of the Rosetta-DL bundle.

Try antibody structure prediction in Google Colab.

Setup

Optional: Create and activate a python virtual environment

python3 -m venv venv
source venv/bin/activate

Install project dependencies

pip install -r requirements.txt

Note: PyRosetta should be installed following the instructions here.

Download pretrained model weights

wget https://data.graylab.jhu.edu/ensemble_abresnet_v1.tar.gz
tar -xf ensemble_abresnet_v1.tar.gz

After unzipping, pre-trained models might need to be moved such that they have paths trained_models/ensemble_abresnet/rs*.pt

Common workflows

Additional options for all scripts are available by running with --help.

Note: This project is tested with Python 3.7.9

Note: Using --renumber option will send your antibody to the AbNum server. If working with confidential sequences you should avoid this option and use an external renumbering tool.

Structure prediction

Generate an antibody structure prediction from an Fv sequence with five decoys:

python predict.py data/sample_files/4h0h.fasta --decoys 5 --renumber

Generate a structure for a single heavy or light chain:

python predict.py data/sample_files/4h0h.fasta --decoys 5 --single_chain

Note: The fasta file should contain a single entry labeled "H" (even if the sequence is a light chain).

Expected output

After the script completes, the final prediction will be saved as pred.deepab.pdb. The numbered decoy structures will be stored in the decoys/ directory.

Attention annotation

Annotate an Fv structure with H3 attention:

python annotate_attention.py data/sample_files/4h0h.truncated.pdb --renumber --cdr_loop h3

Note: CDR loop residues are determined using Chothia definitions, so the input structure should be numbered beforehand or renumbered by passing --renumber

Expected output

After the script completes, the annotated PDB will overwrite the input file (unless --out_file is specificed). Annotations will be stored as b-factor information, and can be visualized in PyMOL or similar software.

Design scoring

Calculate ΔCCE for list of designed sequences:

python score_design.py data/sample_files/wt.fasta data/sample_files/h_mut_seqs.fasta data/sample_files/l_mut_seqs.fasta design_out.csv

Expected output

After the script completes, the designs and scores will be written to a CSV file with each row containing the design ID, heavy chain sequence, light chain sequence, and ΔCCE value.

References

[1] JA Ruffolo, J Sulam, and JJ Gray. "Antibody structure prediction using interpretable deep learning." Patterns (2022).

deepab's People

Contributors

everyday847 avatar jeffreyruffolo avatar jjgray avatar smoe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.