AlloViz.Protein.view

Protein.view(pkg, metric, filtering='All', element='edges', num: int = 20, colors: list = ['orange', 'turquoise'], nv=None)[source]

Visualize the analyzed networks on the protein structure.

Visualize the network corresponding to the selected package/network construction method, filtering scheme, network element and network metric or metrics, all of which must be previously calculated and analyzed. The number of (each of the) elements to show and the color scale can be specified. It calls AlloViz.Elements.Element.view().

Parameters:
pkgstr

Package/Network construction method for which to show the network.

metricstr

Network metric for which to show the network.

filteringstr

Filtering scheme for which to show the network.

elementstr or list, {“edges”, “nodes”}

Network element or elements to show on the protein structure representing the chosen package, filtering scheme and metric.

numint, default: 20

Number of (each of the) network elements to show on the structure.

colorslist, default: [“orange”, “turquoise”]

List of two colors to assign to the minimum and maximum values of the network to be represented, respectively. Middle value is assigned “white” and it will be the mean of the network values or 0 if the network has both negative and positive values.

nvnglview.NGLWidget, optional

A structure representation into which the shapes representing the chosen network elements will be added.

Returns:
nglview.NGLWidget

See also

AlloViz.AlloViz.Elements

Module with classes for storage and visualization of filtered and analyzed networks.

AlloViz.Protein.calculate

Class method to calculate the network(s) raw edge weights with different network construction methods.

AlloViz.Protein.filter

Class method to filter the network(s) raw edge weights with different criteria.

AlloViz.Protein.analyze

Class method to visualize the network on the protein structure.

Examples

>>> opioidGPCR = AlloViz.Protein(GPCR=169)
>>> opioidGPCR.calculate("dynetan", cores=6, taskcpus=2)
>>> opioidGPCR.filter("dynetan", "GetContacts_edges")
>>> opioidGPCR.analyze("dynetan", "GetContacts_edges", "nodes", "btw")
>>> opioidGPCR.view("dynetan", "btw", "GetContacts_edges", element=["edges", "nodes"])
NGLWidget()