Tutorial

Identifying Protein-Protein Interactions (PPIs) with Deep Learning using D-SCRIPT

Difficulty: Advanced Time: 20 min read

Introduction

Understanding which proteins interact with one another is crucial for elucidating cellular mechanisms and designing new drugs. Traditional experimental methods are slow and costly. D-SCRIPT (Deep Sequence Contact Residue Interaction Prediction Tool) is a deep learning model that predicts protein-protein interactions (PPIs) directly from their amino acid sequences using a pre-trained protein language model.

Architecture Overview


graph LR
    Seq1(Protein A Sequence) --> PLM(Protein Language Model)
    Seq2(Protein B Sequence) --> PLM
    PLM --> Embed1(Embedding A)
    PLM --> Embed2(Embedding B)
    Embed1 --> Proj(Projection Module)
    Embed2 --> Proj
    Proj --> Contact(Contact Map Prediction)
    Contact --> Pool(Pooling)
    Pool --> Interaction(Interaction Probability Score)
        

Prerequisites

  • Python 3.8+
  • PyTorch
  • dscript package
  • A FASTA file containing protein sequences

Step 1: Install Dependencies

pip install dscript

Step 2: Preparing the Input Data

D-SCRIPT requires two files to run an interaction prediction:

  1. A .fasta file containing the sequences of the proteins you want to test.
  2. A .tsv (tab-separated values) file listing the specific pairs of proteins you want to evaluate.

Example seqs.fasta:

>ProteinA
MTEYKLVVVGAGGVGKSALTIQLIQNHFVDEYDPTIEDSYRKQVVIDGETCLLDILDTAGQEEYSAMRDQYMRTGEGFLCVFAINNTKSFEDIHQYREQIKRVKDSDDVPMVLVGNKCDLAARTVESRQAQDLARSYGIPYIETSAKTRQGVEDAFYTLVREIRQHKLRKLNPPDESGPGCMSCKCVLS
>ProteinB
MVDGVMILKIKVQQIGNTVGAVLLCKAGDAEKEAIRKAVEQVAAKQGMEICPTGTYTIEIPDDEHREIKRLAERFKTKVPAEDVKLVYEV

Example pairs.tsv:

ProteinA	ProteinB

Step 3: Generating Embeddings

Before predicting interactions, D-SCRIPT converts the raw amino acid sequences into dense vector representations (embeddings) using a pre-trained protein language model (like Bepler & Berger's model).

dscript embed --seqs seqs.fasta --outfile seqs.h5 --device 0

Step 4: Predicting Interactions

We use a pre-trained D-SCRIPT model (e.g., the human PPI model) to score the probability that the two proteins interact.

# Download a pre-trained model (if not already downloaded)
wget https://dscript.mit.edu/models/human_v1.pt

# Run the prediction
dscript predict --pairs pairs.tsv --seqs seqs.fasta --embeddings seqs.h5 --model human_v1.pt --outfile predictions.tsv --device 0

The output predictions.tsv will contain the pair names and a probability score between 0 and 1. A score closer to 1 indicates a highly probable interaction.

Step 5: Training a Custom D-SCRIPT Model

If you are working with a novel organism (e.g., a newly discovered virus), you might want to train a custom model from scratch. You will need a positive and negative set of known interactions.

dscript train \
    --train known_interactions_train.tsv \
    --test known_interactions_test.tsv \
    --embedding embeddings.h5 \
    --outfile my_custom_dscript_model.pt \
    --device 0 \
    --epochs 50

Conclusion

D-SCRIPT enables rapid, sequence-based screening of protein-protein interactions, significantly narrowing down the search space for wet-lab validation and accelerating the discovery of novel biological pathways or host-pathogen interactions.