Skip to content

A structure-aware interpretable deep learning model for sequence-based prediction of protein-protein interactions

License

Notifications You must be signed in to change notification settings

schafferde/D-SCRIPT

 
 

Repository files navigation

D-SCRIPT

PyPI DOI License Pytest Ruff

D-SCRIPT Architecture

D-SCRIPT is a deep learning method for predicting a physical interaction between two proteins given just their sequences. It generalizes well to new species and is robust to limitations in training data size. Its design reflects the intuition that for two proteins to physically interact, a subset of amino acids from each protein should be in contact with the other. The intermediate stages of D-SCRIPT directly implement this intuition, with the penultimate stage in D-SCRIPT being a rough estimate of the inter-protein contact map of the protein dimer. This structurally-motivated design enhances the interpretability of the results and, since structure is more conserved evolutionarily than sequence, improves generalizability across species.

You can now make predictions with D-SCRIPT via the interface on HuggingFace!

Installation

pip install dscript

Usage

Protein sequences need to first be embedded using the Bepler+Berger protein language model; this requires a .fasta file as input. Everything before the first space will be used as the key.

dscript embed --seqs [sequences] --outfile [embedding file]

#Example
dscript embed --seqs data/seqs/ecoli.fasta --outfile ecoli_embed.h5

Candidate pairs should be in tab-separated (.tsv) format with no header, and columns for [protein key 1], [protein key 2]. Optionally, a third column with [label] can be provided, so predictions can be made using training or test data files (but the label will not affect the predictions only the first two columns will be read).

While pre-trained model files can be downloaded directly, we recommend instead passing the name of a pre-trained model that will be automatically downloaded from HuggingFace. Available models include:

  • samsl/dscript_human_v1
  • samsl/topsy_turvy_human_v1 (recommended, default)
  • samsl/tt3d_human_v1
dscript predict --pairs [input data] --embeddings [embedding file] --model [model file] --outfile [predictions file]

#Example
dscript predict --pairs data/pairs/ecoli_toy.tsv --embeddings ecoli_embed.h5 --outfile ecoli_toy_predict

For inference, proteins can be divided into blocks to reduce memory usage for embeddings using --blocks. By default, the CPU is used; a GPU to use can be specified with -d, followed by the index of a GPU or all for all available GPUs.

#Example with 16 blocks, using (using 3/16th the maximum embedding memory), and a GPU
dscript predict --pairs data/pairs/ecoli_test.tsv --embeddings ecoli_embed.h5 --outfile ecoli_test_predict --blocks 16 -d 0

For more information on prediction modes, such as all-pair and bipartite predictions, see our complete documentation

References

About

A structure-aware interpretable deep learning model for sequence-based prediction of protein-protein interactions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 61.6%
  • Jupyter Notebook 37.4%
  • Shell 1.0%