prolint.plotting.network ======================== .. py:module:: prolint.plotting.network .. autoapi-nested-parse:: Network plotters for shared contact visualization. This module provides network graph visualizations for residue contact correlations. Attributes ---------- .. autoapisummary:: prolint.plotting.network.MAX_NETWORK_RESIDUES Classes ------- .. autoapisummary:: prolint.plotting.network.NetworkPlotter Module Contents --------------- .. py:data:: MAX_NETWORK_RESIDUES :value: 100 .. py:class:: NetworkPlotter Bases: :py:obj:`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. .. seealso:: :py:obj:`SharedContactsAnalysis` Generates correlation matrix data :py:obj:`HeatmapPlotter` Alternative matrix visualization .. py:attribute:: name :value: 'network' .. py:attribute:: required_analysis :value: 'shared_contacts' .. py:attribute:: description :value: 'Network graph of query residues sharing database contacts' .. py:method:: validate_result(result: prolint.analysis.base.AnalysisResult) -> None :classmethod: Validate that result contains required network data. .. py:method:: plot(result: prolint.analysis.base.AnalysisResult, threshold: int = 0, selected_residues: Optional[List[int]] = 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: Optional[List[int]] = None) -> Tuple[matplotlib.figure.Figure, matplotlib.axes.Axes] :classmethod: Create network graph visualization. :param result: Result from shared_contacts analysis. :type result: AnalysisResult :param threshold: Minimum shared frames to draw an edge. :type threshold: int, default=0 :param selected_residues: Subset of residues to display. :type selected_residues: list of int, optional :param max_residues: Maximum residues before raising error. :type max_residues: int, default=100 :param highlight_nodes: Residue IDs to highlight. :type highlight_nodes: list of int, optional :param show_edge_labels: Whether to show edge weights. :type show_edge_labels: bool, default=False :returns: Matplotlib figure and axes objects. :rtype: tuple of (Figure, Axes) :raises ImportError: If networkx is not installed. :raises ValueError: If too many residues to display.