EnhancerArcs

Contents

EnhancerArcs#

class alphagenome.visualization.plot_components.EnhancerArcs(links, tss=None, *, upward=True, fig_height=1.0, ylabel='', ylabel_horizontal=True, **kwargs)[source]#

Component for visualizing enhancer-to-gene links as cubic Bezier arcs.

Initializes the EnhancerArcs component.

Parameters:
  • links (DataFrame) – DataFrame of enhancer-to-gene links.

  • tss (int | None (default: None)) – Target gene TSS coordinate; if None, uses tss_col from links.

  • upward (bool (default: True)) – If True, arcs curve upward (y >= 0); otherwise downward.

  • fig_height (float (default: 1.0)) – Height of the component axis.

  • ylabel (str (default: '')) – Optional y-axis label.

  • ylabel_horizontal (bool (default: True)) – Whether to orient ylabel horizontally.

  • **kwargs – Additional keyword arguments forwarded to plot.enhancer_arcs_plot (e.g. interval_contained, gene_id, start_col, end_col, peak_col, tss_col, score_col, color, cmap, vmin, vmax, alpha_range, linewidth_range).

Methods

get_ax_height(axis_index)

Returns the height of the axis.

plot_ax(ax, axis_index, interval)

Plots the enhancer-to-gene arcs on the given axis.