ScoreBar

Contents

ScoreBar#

class alphagenome.visualization.plot_components.ScoreBar(adata, *, width=1.0, fig_height=3.0, ylabel='', max_y_ticks=3, color='#888888')[source]#

Component for plotting a single score per variant.

Initializes the ScoreBar component.

Parameters:
  • adata (AnnData) – AnnData with scores shaped (n_variants, N). Must contain a 'variant' column in obs. If N > 1, the scores are summed.

  • width (float (default: 1.0)) – Width of the bars.

  • fig_height (float (default: 3.0)) – Height of the panel in inches.

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

  • max_y_ticks (int | None (default: 3)) – Maximum number of Y-axis tick divisions (default: 3).

  • color (str (default: '#888888')) – Color to set the bars.

Methods

get_ax_height(axis_index)

Returns the height of the axis.

plot_ax(ax, axis_index, interval)

Plots the bar chart on the given axis.