.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery_output/Networks/plot_protein_interactions.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_output_Networks_plot_protein_interactions.py: Protein interactions network ============================ Post translational modifications (PTMs) often facilitate protein interactions, either through direct binding of domains specific to that particular modification (e.g. SH2 domains binding to phosphorylated tyrosines) or through allosteric effects that change the conformation of the protein to either enhance or disrupt interactions. We provide functions to annotate spliced PTMs with relevant protein interactions and to identify key PTMs that may disrupt protein interaction networks. Currently, we provide functions to process and analyze protein interaction data from PhosphoSitePlus, PTMInt, and PTMcode. We can also include enzyme-specific interactions (such as kinase substrate interactions through PhosphoSitePlus and RegPhos). First, we need to annotate the spliced PTMs with protein interactions (see rest of documentation for how to do this). Then, we can process the interactions across the different databases using the protein_interactions class to identify key PTMs that may disrupt protein interaction networks. .. GENERATED FROM PYTHON SOURCE LINES 9-25 .. code-block:: Python from ptm_pose import helpers from ptm_pose.analyze import interactions import matplotlib.pyplot as plt import warnings warnings.filterwarnings("ignore") #load example differential inclusion data spliced_ptms = helpers.load_example_data(spliced_ptms = True) interactions = interactions.protein_interactions(spliced_ptms) interactions.get_interaction_network() interactions.network_data.head() .. rst-class:: sphx-glr-script-out .. code-block:: none 334 PTMs removed due to insignificant splice event (p < 0.05, dpsi >= 0.2): (69.01%) Final number of PTMs to be assessed: 150 PhosphoSitePlus interaction data found and added PhosphoSitePlus enzyme interaction data found and added No PTMs with enzyme information from PhosphoSitePlus, skipping No interaction data found for PTMcode, skipping No interaction data found for PTMInt, skipping No interaction data found for RegPhos, skipping No interaction data found for DEPOD, skipping No interaction data found for ELM, skipping No interaction data found for OmniPath, skipping .. raw:: html
Modified Gene Interacting Gene Residue Type Source dPSI Regulation Change
0 TSC2 YWHAE S981 INDUCES PhosphoSitePlus -0.219 -
1 TSC2 YWHAZ S981 INDUCES PhosphoSitePlus -0.219 -


.. GENERATED FROM PYTHON SOURCE LINES 26-27 We can also calculate interaction stats to identify proteins that are most impacted or relevant to spliced PTMs and the protein interaction network .. GENERATED FROM PYTHON SOURCE LINES 27-31 .. code-block:: Python interactions.get_interaction_stats() interactions.network_stats.head() .. raw:: html
Degree Degree Centrality Closeness Betweenness
TSC2 2 1.0 1.000000 1.0
YWHAE 1 0.5 0.666667 0.0
YWHAZ 1 0.5 0.666667 0.0


.. GENERATED FROM PYTHON SOURCE LINES 32-33 If we want to focus on a specific protein, we can summarize information about a single protein in the network. In this case, let's look at TSC2, which loses pS981 upon ESRP1 knockdown .. GENERATED FROM PYTHON SOURCE LINES 33-36 .. code-block:: Python interactions.summarize_protein_network(protein = 'TSC2') .. rst-class:: sphx-glr-script-out .. code-block:: none Decreased interaction likelihoods: YWHAE, YWHAZ Number of interactions: 2 (Rank: 1) Centrality measures - Degree = 1.0 (Rank: 1) Betweenness = 1.0 (Rank: 1) Closeness = 1.0 (Rank: 1) .. GENERATED FROM PYTHON SOURCE LINES 37-38 We can also visualize the network... .. GENERATED FROM PYTHON SOURCE LINES 38-43 .. code-block:: Python interactions.plot_interaction_network(interacting_node_size = 10) plt.tight_layout() plt.show() .. image-sg:: /gallery_output/Networks/images/sphx_glr_plot_protein_interactions_001.png :alt: plot protein interactions :srcset: /gallery_output/Networks/images/sphx_glr_plot_protein_interactions_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 44-45 ...and the centrality of proteins in the network .. GENERATED FROM PYTHON SOURCE LINES 45-48 .. code-block:: Python interactions.plot_network_centrality(centrality_measure='Degree') plt.tight_layout() plt.show() .. image-sg:: /gallery_output/Networks/images/sphx_glr_plot_protein_interactions_002.png :alt: plot protein interactions :srcset: /gallery_output/Networks/images/sphx_glr_plot_protein_interactions_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.379 seconds) .. _sphx_glr_download_gallery_output_Networks_plot_protein_interactions.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_protein_interactions.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_protein_interactions.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_protein_interactions.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_