alphagenome.visualization.plot_components.plot#
- alphagenome.visualization.plot_components.plot(components, interval, fig_width=20, fig_height_scale=1.0, title=None, despine=True, despine_keep_bottom=False, annotations=None, annotation_offset_range=(0.1, 0.6), hspace=0.3, xlabel=None)[source]#
Plots AlphaGenome model outputs as individual panels of ‘components’.
This function generates a visualization of AlphaGenome model outputs using a combination of components (e.g., tracks, contact maps) and annotations (e.g., intervals, variants).
- Parameters:
components (
Sequence[AbstractComponent]) – A sequence of components to visualize.interval (
Interval) – The genomic interval to focus on (similar to setting xlim in matplotlib).fig_width (
int(default:20)) – The total figure width.fig_height_scale (
float(default:1.0)) – Height of the individual track unit. Total plot height is determined as a sum of the individual component heights.title (
Optional[str] (default:None)) – An optional title for the overall plot.despine (
bool(default:True)) – Whether to remove top, right, and bottom spines from the axes.despine_keep_bottom (
bool(default:False)) – Whether to remove top and right spines, but keep the bottom spine. Does not apply to transcript components, which are always despined.annotations (
Optional[Sequence[AbstractAnnotation]] (default:None)) – Sequence of annotations to visualise across all components.annotation_offset_range (
tuple[float,float] (default:(0.1, 0.6))) – Relative positions in y-axis to place labels for annotations. Each set of labels in the ‘annotations’ list are spaced evenly within this range.hspace (
float(default:0.3)) – Vertical whitespace between subplots to avoid tick label overlap (relative fraction).xlabel (
Optional[str] (default:None)) – If a non-empty string is provided, it is used as the x-axis label. If an empty string is provided, the x-axis label is removed. If None, the default x-axis label is used.
- Return type:
- Returns:
A matplotlib figure.