.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery_output/Overview_of_Spliced_PTMs/plot_PTM_annotations.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_Overview_of_Spliced_PTMs_plot_PTM_annotations.py: Inspecting number of PTMs with annotation information available ============================================================================================================= As described in Running PTM-POSE section, PTM-POSE provides various options for annotating functional information for PTMs, coming from various databases. However, PTM functional information is inherently sparse, and so most annotations will only provide information on a handful of PTMs. For this reason, it can be useful to probe how many PTMsTo better understand the types of annotations that are available, as well as the number of PTMs that have an annotation of that type. This can be done using the analyze function in PTM-POSE. Note: This examples assumes that you have already run the PTM-POSE pipeline and have at annotated PTMs with at least one layer of information. .. GENERATED FROM PYTHON SOURCE LINES 9-17 .. code-block:: Python from ptm_pose import helpers from ptm_pose.analyze import annotations import matplotlib.pyplot as plt #load example differential inclusion data spliced_ptms = helpers.load_example_data(spliced_ptms = True) .. GENERATED FROM PYTHON SOURCE LINES 18-21 .. code-block:: Python available_annotations = annotations.get_available_annotations(spliced_ptms) available_annotations .. raw:: html
Database Annotation Type Appended to PTM data?
0 iKiP Enzyme No
1 PhosphoSitePlus Enzyme No
2 PhosphoSitePlus Disease No
3 PhosphoSitePlus Interactions No
4 PhosphoSitePlus Function No
5 PhosphoSitePlus Process No
6 PhosphoSitePlus Perturbation No
7 PTMsigDB Perturbation-DIA No
8 PTMsigDB Perturbation-DIA2 No
9 PTMsigDB Pathway-NetPath No
10 PTMsigDB Pathway-WikiPathways No
11 PTMsigDB Perturbation-PRM No
12 PTMsigDB Pathway-BI No
13 DEPOD Enzyme No
14 RegPhos Enzyme No


.. GENERATED FROM PYTHON SOURCE LINES 22-23 You can also visualize the number of PTMs with annotation information available for each annotation type using a bar plot. .. GENERATED FROM PYTHON SOURCE LINES 23-28 .. code-block:: Python annotations.plot_available_annotations(spliced_ptms) plt.tight_layout() plt.show() .. image-sg:: /gallery_output/Overview_of_Spliced_PTMs/images/sphx_glr_plot_PTM_annotations_001.png :alt: plot PTM annotations :srcset: /gallery_output/Overview_of_Spliced_PTMs/images/sphx_glr_plot_PTM_annotations_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 29-30 As you can, see there are only a few PTMs from each annotation that have available information, with the most being 9 PTMs out of the 184 differentially included sites having been associated with a biological process. While this this should be taken into consideration when analyzing these annotations, we can glean some useful information and identify potentially interesting proteins/sites to dig deeper into. Let’s look at the PTMs that have been associated with a biological process: .. GENERATED FROM PYTHON SOURCE LINES 30-35 .. code-block:: Python ptms_with_annotation, annotation_counts = annotations.get_ptm_annotations(spliced_ptms, database = "PhosphoSitePlus", annotation_type = 'Process') print('Specific PTMs with annotation:') ptms_with_annotation .. rst-class:: sphx-glr-script-out .. code-block:: none 3 PTMs removed due to insignificant splice event (p < 0.05, dpsi >= 0.1): (33.33%) Final number of PTMs to be assessed: 6 Specific PTMs with annotation: .. raw:: html
Gene UniProtKB Accession Residue PTM Position in Isoform Modification Class PhosphoSitePlus:Function dPSI Significance Impact
0 CEACAM1 P13688 S 461.0 Phosphorylation activity, inhibited 0.525 1.73943268451e-09 Included
1 SPHK2 Q9NRA0 S 419.0 Phosphorylation intracellular localization 0.253 0.0129400018182 Included
2 SPHK2 Q9NRA0 S 421.0 Phosphorylation intracellular localization 0.253 0.0129400018182 Included
3 TSC2 P49815 S 981.0 Phosphorylation activity, inhibited;molecular association, reg... -0.219 4.18472157275e-05 Excluded
4 YAP1 P46937 K 342.0 Ubiquitination protein degradation -0.161;-0.188 0.000211254197372;4.17884655686e-07 Excluded


.. GENERATED FROM PYTHON SOURCE LINES 36-37 We can also look at the number of PTMs associated with each annotation: .. GENERATED FROM PYTHON SOURCE LINES 37-41 .. code-block:: Python print('Number of PTMs associated with each annotation:') annotation_counts .. rst-class:: sphx-glr-script-out .. code-block:: none Number of PTMs associated with each annotation: .. raw:: html
All Impacted Included Excluded
PhosphoSitePlus:Function
intracellular localization 3 2.0 1
activity, inhibited 2 1.0 1
molecular association, regulation 1 0.0 1
protein degradation 1 0.0 1


.. GENERATED FROM PYTHON SOURCE LINES 42-43 Note: you could also do this analysis for altered flanking sequences by replacing `spliced_ptms` with `altered_flanks` in the above code. .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.710 seconds) .. _sphx_glr_download_gallery_output_Overview_of_Spliced_PTMs_plot_PTM_annotations.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_PTM_annotations.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_PTM_annotations.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_PTM_annotations.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_