prolint.plotting.residues¶
Residue metrics plotters for per-residue visualization.
This module provides bar charts and logo grids for displaying per-residue contact metrics.
Classes¶
Plotter for per-residue contact metrics. |
|
Plotter for grid-based residue logo visualization. |
Module Contents¶
- class prolint.plotting.residues.ResidueMetricsPlotter[source]¶
Bases:
prolint.plotting.base.BasePlotterPlotter for per-residue contact metrics.
Visualizes metrics as bar charts or scatter plots with amino acid coloring and highlighting options.
See also
MetricsAnalysisGenerates per-residue metric data
LogoGridPlotterGrid-based residue visualization
- classmethod validate_result(result: prolint.analysis.base.AnalysisResult) None[source]¶
Validate that result contains residue metrics data.
- classmethod plot(result: prolint.analysis.base.AnalysisResult, style: str = 'bar', colorscheme: str = 'prolint', xlabel: str = 'Residue', ylabel: str = 'Value', title: str = 'Per-Residue Metrics', figsize: Tuple[float, float] | None = None, ax: matplotlib.axes.Axes | None = None, show_aa_labels: bool = True, highlight_residues: List[int] | None = None, bar_width: float = 0.8, sort_by_value: bool = False, marker_size: int = 50) Tuple[matplotlib.figure.Figure, matplotlib.axes.Axes][source]¶
Create per-residue metrics visualization.
- Parameters:
result (AnalysisResult) – Result from metrics analysis.
style ({"bar", "scatter"}, default="bar") – Plot style.
colorscheme (str, default="prolint") – Color scheme (“prolint”, “amino_acid”, or scale name).
show_aa_labels (bool, default=True) – Whether to show amino acid labels on x-axis.
highlight_residues (list of int, optional) – Residue IDs to highlight.
sort_by_value (bool, default=False) – Whether to sort residues by value.
ax (Axes, optional) – Existing axes to plot on.
- Returns:
Matplotlib figure and axes objects.
- Return type:
tuple of (Figure, Axes)
- class prolint.plotting.residues.LogoGridPlotter[source]¶
Bases:
prolint.plotting.base.BasePlotterPlotter for grid-based residue logo visualization.
Displays residues as colored cells arranged in rows with one-letter amino acid codes and residue numbers.
See also
MetricsAnalysisGenerates per-residue metric data
ResidueMetricsPlotterBar/scatter visualization
- classmethod validate_result(result: prolint.analysis.base.AnalysisResult) None[source]¶
Validate that result contains residue metrics data.
- classmethod plot(result: prolint.analysis.base.AnalysisResult, colorscheme: str = 'prolint', residues_per_row: int = 80, cell_size: float = 0.3, title: str = 'Residue Logo Plot', figsize: Tuple[float, float] | None = None, highlight_residues: List[int] | None = None) Tuple[matplotlib.figure.Figure, matplotlib.axes.Axes][source]¶
Create grid-based residue logo visualization.
- Parameters:
result (AnalysisResult) – Result from metrics analysis.
colorscheme (str, default="prolint") – Color scale name for value-based coloring.
residues_per_row (int, default=80) – Number of residue cells per row.
cell_size (float, default=0.3) – Size of each cell in inches.
title (str, default="Residue Logo Plot") – Plot title.
figsize (tuple of (float, float), optional) – Figure dimensions (width, height). Auto-calculated if None.
highlight_residues (list of int, optional) – Residue IDs to highlight with colored borders.
- Returns:
Matplotlib figure and axes objects.
- Return type:
tuple of (Figure, Axes)