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 .
python==3.9, transformers==4.27.4 (or <=4.30.2), biopython==1.78, pandas==1.3.5, scikit-learn==1.0.2
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.
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 |
-
Download the checkpoint of DeepNano-seq(NAI) 8M and put it in the ./output/checkpoint.
-
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
.
-
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
.
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.
-
Get predictions on five PPI test datasets:
python test_ppi_ESM2.py
-
Get predictions on the NAI test dataset:
python test_nai.py
-
Virtual screening of anti-HSA and anti-GST:
python test_case.py python test_background.py --size 100w
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
Feel free to contact [email protected] if you have issues for any questions.