.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery_output/flanking_sequences/plot_sh2_domain_motifs.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_flanking_sequences_plot_sh2_domain_motifs.py: Identify altered SH2 domain motifs =========================================================== A potential consequence of altered flanking sequences is that the short linear motifs important for driving PTM-specific domain interactions are disrupted, such as for the phosphotyrosine binding domains SH2 or 14-3-3 proteins (which bind to phosphoserines and threonines). Using PTM-POSE and motif data from [ELM](http://elm.eu.org/searchdb.html), we can identify and visualize the altered 14-3-3 domain motifs due to splicing events. .. GENERATED FROM PYTHON SOURCE LINES 7-14 .. code-block:: Python from ptm_pose import helpers from ptm_pose.analyze import flank_analysis as afs #load example altered flanking sequence data altered_flanks = helpers.load_example_data(altered_flanks = True) .. GENERATED FROM PYTHON SOURCE LINES 15-16 First, we need to identify the linear motifs present for each altered flanking sequence event. We can do this with the `compare_inclusion_motifs` function, which will identify matching any matching motifs for both the inclusion and exclusion flanking sequences. .. GENERATED FROM PYTHON SOURCE LINES 16-20 .. code-block:: Python altered_flanks = afs.compare_inclusion_motifs(altered_flanks) altered_flanks[['Gene', 'Residue', 'PTM Position in Isoform', 'Motif only in Inclusion', 'Motif only in Exclusion']].head() .. raw:: html
Gene Residue PTM Position in Isoform Motif only in Inclusion Motif only in Exclusion
0 ARHGAP17 S 497 DOC_MAPK_gen_1;LIG_PDZ_Class_2;LIG_WD40_WDR5_V... LIG_SH3_3;LIG_SH3_1
1 ARHGAP17 S 497 DOC_MAPK_gen_1;LIG_PDZ_Class_2;LIG_WD40_WDR5_V... LIG_SH3_3;LIG_SH3_1
2 KRAS K 147 TRG_ER_diArg_1
3 KRAS K 147 TRG_ER_diArg_1
4 KRAS T 148 TRG_ER_diArg_1


.. GENERATED FROM PYTHON SOURCE LINES 21-22 We can then identify the instances in which 14-3-3 motifs are altered: .. GENERATED FROM PYTHON SOURCE LINES 22-25 .. code-block:: Python fourteen33_motifs = afs.identify_change_to_specific_motif(altered_flanks, elm_motif_name = '14-3-3', modification_class = 'Phosphorylation', residues = ['S','T']) fourteen33_motifs[['Gene', 'Residue', 'PTM Position in Isoform', 'Motif only in Inclusion', 'Motif only in Exclusion']] .. rst-class:: sphx-glr-script-out .. code-block:: none 77 PTMs removed due to insignificant splice event (p < 0.05, dpsi >= 0.2): (51.33%) Final number of PTMs to be assessed: 73 .. raw:: html
Gene Residue PTM Position in Isoform Motif only in Inclusion Motif only in Exclusion
23 MLPH S 336 LIG_14-3-3_CanoR_1 NaN
52 CEACAM1 T 457 LIG_14-3-3_CterR_2 NaN
68 ENAH S 512 NaN LIG_14-3-3_CterR_2
84 TSC2 S 946 NaN LIG_14-3-3_CterR_2


.. GENERATED FROM PYTHON SOURCE LINES 26-27 And visualize the differences in sequence .. GENERATED FROM PYTHON SOURCE LINES 27-28 .. code-block:: Python afs.plot_alterations_matrix(fourteen33_motifs) .. image-sg:: /gallery_output/flanking_sequences/images/sphx_glr_plot_sh2_domain_motifs_001.png :alt: plot sh2 domain motifs :srcset: /gallery_output/flanking_sequences/images/sphx_glr_plot_sh2_domain_motifs_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 4.535 seconds) .. _sphx_glr_download_gallery_output_flanking_sequences_plot_sh2_domain_motifs.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_sh2_domain_motifs.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_sh2_domain_motifs.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_sh2_domain_motifs.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_