Analysing PPIs

After the extraction, one can visualize protein-protein interactions (PPIs) via the PyMOL wrapper and get their statistics.

[2]:
from ppiref.visualization import PyMOL
from ppiref.utils.ppi import PPI
from ppiref.definitions import PPIREF_TEST_DATA_DIR

In the examples below, we will reuse the PPIs extracted in the previous tutorial “Extracting PPIs”.

Example 1. Visualize a dimer.

[3]:
pymol = PyMOL()
ppi_complexes_dir = PPIREF_TEST_DATA_DIR / 'ppi_dir_complexes'
ppi_file = ppi_complexes_dir / 'bu/1bui_A_C.pdb'
pymol.display_ppi(ppi_file, sticks=False, letters=False, color_by_residues=False)
2024-06-21 17:52:28.817 Python[81810:4602120] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
[3]:
_images/analysing_ppis_4_1.png

Example 2. Visualize an interface.

[4]:
ppi_dir = PPIREF_TEST_DATA_DIR / 'ppi_dir'
ppi_file = ppi_dir / 'bu/1bui_A_C.pdb'
pymol.display_ppi(ppi_file, sticks=True, letters=True, color_by_residues=False)
2024-06-21 17:52:31.235 Python[81817:4602271] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
[4]:
_images/analysing_ppis_6_1.png

Example 3. Get the statistics of a PPI.

[5]:
ppi = PPI(ppi_file)
ppi.stats
[5]:
{'KIND': 'heavy',
 'EXTRACTION RADIUS': 10.0,
 'EXPANSION RADIUS': 0.0,
 'RESOLUTION': 2.65,
 'STRUCTURE METHOD': 'x-ray diffraction',
 'DEPOSITION DATE': '1998-09-04',
 'RELEASE DATE': '1999-09-02',
 'BSA': 898.378288445}