Skip to content

Find shortest path between selected residues in a protein structure

License

Notifications You must be signed in to change notification settings

ugSUBMARINE/shortest-path

Repository files navigation

TEST Code style: black

This repository contains two programs:

  • shortest_protein_path
    • Find the shortest path (via Dijkstra's shortest path algorithm) between either the two furthest apart vertices (side chains) (default) or between two selected vertices (residues in a protein structure). alt text
  • minimum_spanning_tree
    • Find the minimum spanning tree (via Prim's minimum spanning tree algorithm) between all connected vertices (side chains with a distance lower than the threshold) using distance matrix. alt text

To run each program the pdb file of the protein of interest is needed.

There are two ways to create the graph based on the protein structure to calculate connected vertices:

  • The distance between the closest side chain atoms
  • The distance between pseudoatoms (midpoints of the catalytically important atoms in a side chain)

If needed, commands that create pseudoatoms and distances for pymol that represent points and their connections in the shortest path can be displayed.

Each program can also be used with non- protein inputs.

Software Requirements:

optional:

In order to install the required packages run:

python3 -m venv /PATH/TO/YOUR/VENV
source venv/bin/activate
pip install -r requirements.txt

In order to see all parameters run:

python3 shortest_protein_path.py -h

python3 minimum_spanning_tree.py -h

To run the programs in default mode run:

python3 shortest_protein_path.py -f /PATH/TO/PDB/FILE

python3 minimum_spanning_tree.py -f /PATH/TO/PDB/FILE