Skip to content

Repository for paper Nanobody–antigen interaction prediction with ensemble deep learning and prompt-based protein language models.

License

Notifications You must be signed in to change notification settings

ddd9898/DeepNano

Repository files navigation

DeepNano

DeepNano is a tool for predicting nanobody-antigen interactions. This repository contains code and model weights for DeepNano-seq, DeepNano-site and DeepNano. More details can be found in our paper . Alternative text


System requirements

python==3.9, transformers==4.27.4 (or <=4.30.2), biopython==1.78, pandas==1.3.5, scikit-learn==1.0.2


Setup of DeepNano

The code was executed under python=3.9 and torch=1.13.1+cu116, we recommend you to use similar package versions.

Install DeepNano:

git clone https://github.com/ddd9898/DeepNano.git
cd DeepNano
pip install -r requirements.txt

This may take several minutes depending on your internet conditions.


Checkpoints

Our trained models can be downloaded at link .

DeepNano-seq(PPI) DeepNano-seq(NAI) DeepNano-site DeepNano(NAI)
8M 8M 8M 8M
35M 35M 35M 35M
150M 150M 150M 150M
650M 650M 650M 650M

Demo

  1. Download the checkpoint of DeepNano-seq(NAI) 8M and put it in the ./output/checkpoint.

  2. Organize your input information as the following format:

    a. Pair data:

    Nanobody-ID Antigen-ID Label

    b. Sequence data:

    >nb0
    MAQVQLLESGGGLVQPGGSLRLSCAASGVTITDEDMTRVRQAPGKGLEWVSSILNTGGSTYYADSVKGRFTISRDNSKNTLYLQMNSLRAEDTAVYYCAAVHEKAADMNFWGQGTLVTVSS
    >at0
    DHNPFISVEWLKGPILEATAGDELVKLPVKLAAYPPPEFQWYKDGKALSGRHSPHALVLKEVTEASTGTYTLALWNSAAGLRRNISLELVVNVPPQIHEKEASSPSIYSRHSRQALTCTAYGVPLPLSIQWHWRPWTPCKMFAQRSLRRRQQQDLMPQCRDWRAVTTQDAVNPIESLDTWTEFVEGKNKTVSKLVIQNANVSAMYKCVVSNKVGQDERLIYFYVTTHHHHHH

​ Then change the three variables (fasta_path,pair_path and output_path) in ./predict.py.

  1. Run the script to get predictions:

    python predict.py --model 1 --esm2 8M &
    

    where the --model 0, 1, and 2 correspond to the DeepNano-seq(PPI),DeepNano-seq(NAI), and DeepNano(NAI) models, respectively.

    Prediction results will be saved at the output_path .


Inference time

For the human serum albumin (609aa), to predict its interactions with 1 million nanobodies, the elapsed time for both DeepNano-seq and DeepNano models is shown in the table below:

8M 35M 150M 650M
DeepNano-seq 1.15 2.27 6.92 20.3
DeepNano 2.30 4.62 13.92 40.8

Time units are in hours.


Reproduction

  1. Get predictions on five PPI test datasets:

    python test_ppi_ESM2.py
  2. Get predictions on the NAI test dataset:

    python test_nai.py
  3. Virtual screening of anti-HSA and anti-GST:

    python test_case.py
    python test_background.py  --size 100w

Cite

Deng, J., Gu, M., Zhang, P. et al. Nanobody–antigen interaction prediction with ensemble deep learning and prompt-based protein language models. Nat Mach Intell (2024). https://doi.org/10.1038/s42256-024-00940-5


Contact

Feel free to contact [email protected] if you have issues for any questions.

About

Repository for paper Nanobody–antigen interaction prediction with ensemble deep learning and prompt-based protein language models.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages