conkit.plot.ContactDensityPlot module

A module to produce a domain boundary plot

class ContactDensityFigure(hierarchy, bw_method='bowman', **kwargs)[source]

Bases: conkit.plot._Figure.Figure

A Figure object specifically for a contact density illustration.

This figure is an adaptation of the algorithm published by Sadowski (2013) [1].

[1]Sadowski M. (2013). Prediction of protein domain boundaries from inverse covariances. Proteins 81(2), 253-260.

Examples

>>> import conkit
>>> cmap = conkit.io.read('toxd/toxd.mat', 'ccmpred').top_map
>>> conkit.plot.ContactDensityFigure(cmap)

Attributes

hierarchy A ConKit ContactMap
bw_method The method to estimate the bandwidth

Methods

bowman_bandwidth(X) This is the optimal bandwidth if the point distribution is Gaussian.
redraw() Re-draw the plot with updated parameters
BW_METHODS = ['bowman']
static bowman_bandwidth(X)[source]

This is the optimal bandwidth if the point distribution is Gaussian.

To calculate the bandwidth for the 1D data array X with n data points, the following equation is used:

\[bandwidth=\sqrt{\frac{\sum{X}^2}{n}-(\frac{\sum{X}}{n})^2}*(\frac{3*n}{4})^\frac{-1}{5}\]

This equation is a direct implementation taken from Bowman & Azzalini [2].

[2]Bowman, A.W. & Azzalini, A. (1997). Applied Smoothing Techniques for Data Analysis.
Parameters:

X : list, tuple

A list of data points

bw_method

The method to estimate the bandwidth

hierarchy

A ConKit ContactMap

redraw()[source]

Re-draw the plot with updated parameters