Example PyMol API output ======================== Here are shown the output generated for the cdk2.fasta alignment file in the examples directory using the PyMol API. .. code-block:: python from Polyphony.Pymol import Pymol_Viz cdk2 = Pymol_Viz("cdk2.fasta","cdk2") .. code-block:: python cdk2.colour_by_variability() .. image:: images/colour_by_variability.png :scale: 40 % :align: center .. automethod:: Polyphony.Pymol.Pymol_Viz.colour_by_variability .. code-block:: python cdk2.colour_by_average_bfactor() .. image:: images/colour_by_average_bfactor.png :scale: 40 % :align: center .. automethod:: Polyphony.Pymol.Pymol_Viz.colour_by_average_bfactor .. code-block:: python cdk2.colour_by_seq_variability() .. image:: images/colour_by_seq_variability.png :scale: 40 % :align: center .. automethod:: Polyphony.Pymol.Pymol_Viz.colour_by_seq_variability .. code-block:: python cdk2.colour_by_Ramachandran_region() .. image:: images/colour_by_Ramachandran_region.png :scale: 40 % :align: center .. automethod:: Polyphony.Pymol.Pymol_Viz.colour_by_Ramachandran_region .. code-block:: python cdk2.colour_by_contacts(type="crystal_contacts") .. image:: images/colour_by_contacts.png :scale: 40 % :align: center .. automethod:: Polyphony.Pymol.Pymol_Viz.colour_by_contacts .. code-block:: python cdk2.colour_by_pockets() .. image:: images/colour_by_pockets.png :scale: 40 % :align: center .. automethod:: Polyphony.Pymol.Pymol_Viz.colour_by_pockets .. code-block:: python cdk2.colour_by_druggable_pockets() .. image:: images/colour_by_druggable_pockets.png :scale: 40 % :align: center .. automethod:: Polyphony.Pymol.Pymol_Viz.colour_by_druggable_pockets .. code-block:: python cdk2.colour_by_pca(max_pc_chains_to_ignore=15, components=[0]) .. image:: images/colour_by_pca_plot.png :scale: 40 % :align: center .. image:: images/colour_by_pca.png :scale: 40 % :align: center .. automethod:: Polyphony.Pymol.Pymol_Viz.colour_by_pca .. code-block:: python cdk2.colour_conserved_segments(20, separation=50) .. image:: images/colour_conserved_segments.png :scale: 40 % :align: center .. automethod:: Polyphony.Pymol.Pymol_Viz.colour_conserved_segments Show the 20 residue pairs, separated by at least 50 residues, with most correlated backbone conformations. .. code-block:: python cdk2.show_correlated_backbones(20, separation=50) .. image:: images/show_correlated_backbones.png :scale: 40 % :align: center .. automethod:: Polyphony.Pymol.Pymol_Viz.show_correlated_backbones Show the 50 residue pairs, separated by at least 5 residues, with most correlated side-chain conformations. .. code-block:: python cdk2.show_correlated_sidechains(50, separation=5) .. image:: images/show_correlated_sidechains.png :scale: 40 % :align: center .. automethod:: Polyphony.Pymol.Pymol_Viz.show_correlated_sidechains Show backbone regions and sidechains that change conformation when cyclin is bound to cdk2 .. code-block:: python from Polyphony.Pymol import Pymol_Viz cdk2 = Pymol_Viz("clust_1H26_A_90.fasta","cdk2") # # group by Piccolo annotated protein-protein interactions groups = cdk2.group_biggest_clusters(property="ppi") active = groups[0]+groups[1] inactive = groups[2] # # default structure is without cyclin bound cdk2.colour_by_amplification(property="backbone", groups=[active,inactive]) cdk2.colour_by_amplification(property="sidechain", groups=[active,inactive]) # # load structure representative of cyclin bound state active_rep = cdk2.get_representative_structure([active]) cdk2.load_structures([active_rep]) cdk2.colour_by_amplification(property="backbone", groups=[active,inactive], chain_id=active_rep) cdk2.colour_by_amplification(property="sidechain", groups=[active,inactive], chain_id=active_rep) .. image:: images/active_inactive.png :scale: 40 % :align: center Do similar for p38, after clustering by backbone conformation .. code-block:: python # Read in alignment p38 = Pymol_Viz("../p38/clust_1A9U_A_90.fasta","p38") # Cluster by backbone conformation in 2 largest groups [0,1] and then into largest subgroups [2,3] and [4,5], [6] contains outliers p38_groups = p38.group_biggest_clusters(3) p38_group_names = p38.ids_for_groups(p38_groups) p38_b1 = p38_groups[0] p38_b2 = p38_groups[1] p38_b11 = p38_groups[2] p38_b12 = p38_groups[3] p38_b21 = p38_groups[4] p38_b22 = p38_groups[5] # Load representative structure (most ordered residues) for each group into PyMol p38_b1_rep = p38.get_representative_structure([p38_b1]) p38_b2_rep = p38.get_representative_structure([p38_b2]) p38_b11_rep = p38.get_representative_structure([p38_b11]) p38_b12_rep = p38.get_representative_structure([p38_b12]) p38_b21_rep = p38.get_representative_structure([p38_b21]) p38_b22_rep = p38.get_representative_structure([p38_b22]) # load representative structure aligned to residues 127-144 for consistency with cdk2 example p38.load_structures([p38_b1_rep,p38_b2_rep,p38_b11_rep,p38_b12_rep,p38_b21_rep,p38_b22_rep], segment=(127,144)) # Colour residues by amplified changes between subgroups b21 and b22 p38.colour_by_amplification(property="backbone",groups=[p38_b21,p38_b22],chain_id=p38_b22_rep) p38.colour_by_amplification(property="backbone",groups=[p38_b21,p38_b22],chain_id=p38_b21_rep) p38.colour_by_amplification(property="sidechain",groups=[p38_b21,p38_b22],chain_id=p38_b21_rep) p38.colour_by_amplification(property="sidechain",groups=[p38_b21,p38_b22],chain_id=p38_b22_rep) .. image:: images/p38_b21_b22.png :scale: 40 % :align: center