alphagenome.visualization.plot_components.TranscriptAnnotation#

class alphagenome.visualization.plot_components.TranscriptAnnotation(transcripts, adaptive_fig_height=True, fig_height=1.0, transcript_style=TranscriptStyle(cds_height=0.4, utr_height=0.22, cds_color='black', utr5_color='black', utr3_color='black', first_noncoding_exon_color='black', label_color='black', xlim_pad=0.05), plot_labels_once=True, label_name='gene_name', **kwargs)[source]#

Visualizes transcript annotations.

Attributes#

Table

num_axes

Returns the number of matplotlib axes required by the component.

TranscriptAnnotation.num_axes#

Returns the number of matplotlib axes required by the component.

TranscriptAnnotation.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 transcript annotations on the given axis.

TranscriptAnnotation.get_ax_height(axis_index)[source]#

Returns the height of the axis.

Return type:

float

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

Plots the transcript annotations 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.