alphagenome.visualization.plot_components.Tracks

alphagenome.visualization.plot_components.Tracks#

class alphagenome.visualization.plot_components.Tracks(tdata, cmap='viridis', truncate_cmap=True, track_height=1.0, filled=False, ylabel_template='{name}:{strand}', ylabel_horizontal=True, shared_y_scale=False, global_ylims=None, max_num_tracks=50, track_colors=None, **kwargs)[source]#

Component for visualizing tracks.

Attributes#

Table

num_axes

Returns the number of matplotlib axes required by the component.

Tracks.num_axes#

Returns the number of matplotlib axes required by the component.

Tracks.total_height#

Returns the total figure height.

Methods#

Table

get_ax_height(axis_index)

Returns the height of the axis.

plot_ax(ax, axis_index, interval)

Plots the tracks on the given axis.

Tracks.get_ax_height(axis_index)[source]#

Returns the height of the axis.

Return type:

float

Tracks.plot_ax(ax, axis_index, interval)[source]#

Plots the tracks on the given axis.

Parameters:
  • ax (Axes) – The matplotlib axis to plot on.

  • axis_index (int) – The index of the axis.

  • interval (Interval) – The genomic interval to plot.