prolint.plotting.network

Network plotters for shared contact visualization.

This module provides network graph visualizations for residue contact correlations.

Attributes

Classes

NetworkPlotter

Plotter for residue contact correlation networks.

Module Contents

prolint.plotting.network.MAX_NETWORK_RESIDUES = 100[source]
class prolint.plotting.network.NetworkPlotter[source]

Bases: prolint.plotting.base.BasePlotter

Plotter for residue contact correlation networks.

Visualizes query residues as nodes connected by edges when they share contacts with the same database molecule.

See also

SharedContactsAnalysis

Generates correlation matrix data

HeatmapPlotter

Alternative matrix visualization

name = 'network'[source]
required_analysis = 'shared_contacts'[source]
description = 'Network graph of query residues sharing database contacts'[source]
classmethod validate_result(result: prolint.analysis.base.AnalysisResult) None[source]

Validate that result contains required network data.

classmethod plot(result: prolint.analysis.base.AnalysisResult, threshold: int = 0, selected_residues: List[int] | None = None, max_residues: int = MAX_NETWORK_RESIDUES, figsize: Tuple[float, float] = (10, 10), node_size: int = 500, font_size: int = 8, show_edge_labels: bool = False, title: str = 'Shared Contacts Network', highlight_nodes: List[int] | None = None) Tuple[matplotlib.figure.Figure, matplotlib.axes.Axes][source]

Create network graph visualization.

Parameters:
  • result (AnalysisResult) – Result from shared_contacts analysis.

  • threshold (int, default=0) – Minimum shared frames to draw an edge.

  • selected_residues (list of int, optional) – Subset of residues to display.

  • max_residues (int, default=100) – Maximum residues before raising error.

  • highlight_nodes (list of int, optional) – Residue IDs to highlight.

  • show_edge_labels (bool, default=False) – Whether to show edge weights.

Returns:

Matplotlib figure and axes objects.

Return type:

tuple of (Figure, Axes)

Raises: