LTP ElecSimilarity Interactive Plotting Demo

This notebook showcases the interactive plotting function plotESD_interactive in AESOP using the LTP plant proteins ElecSimilarity example.The sample code below imports the relevant classes and functions to perform Electrostatic Similarity analysis and output the results using interactive plots.

Before proceeding, make sure you have the python packages plotly and networkx installed as described in the documentation.

In [ ]:
from aesop import ElecSimilarity, plotESD_interactive

path_apbs    = 'path\to\executable\apbs'
path_coulomb = 'path\to\executable\coulomb'
path_pdb2pqr = 'path\to\executable\pdb2pqr'

pdbfiles = ['1MZL.pdb', 'SCA1.pdb', 'SCA3.pdb']
jobname = 'LTP_test1'

family = ElecSimilarity(pdbfiles=pdbfiles,
                        pdb2pqr_exe=path_pdb2pqr,
                        apbs_exe=path_apbs,
                        jobname=jobname)

family.run(superpose=True, center=False)

Once ElecSimilarity is instantiated and finished running, we can plot the results. The plotESD_interactive by default, outputs the results in an html file and opens it up in your browser. However, if you are using a notebook to view it, you can display the plot inline by passing the argument display_output='notebook' to the function.

The plotESD_interactive function combines the heatmap and dendrogram functionality of plotDend and plotESD but now hovering over specific regions displays the corresponding ESD. Additionally, clicking and dragging in the plot allows you to zoom in a subset of values. The plotly modebar in the top right has additional options such as zoom, autoscale and saving as a static image.

In [2]:
plotESD_interactive(family,display_output='notebook')
#If you are not using a notebook to run your code then use the code below instead:
#plotESD_interactive(family)