AbstractAnnotation#
- class alphagenome.visualization.plot_components.AbstractAnnotation(annotations, colors, labels, use_default_labels)[source]#
Abstract base class for plot annotations.
Annotations are visual elements that can be added to plots to highlight specific features or regions. This class defines the common interface for all annotations.
- annotations#
A sequence of
VariantorIntervalobjects representing the annotations.
- colors#
An optional string or sequence of strings specifying the colors of the annotations.
- labels#
An optional sequence of strings to use as labels for the annotations.
- use_default_labels#
Whether to use default labels for the annotations if
labelsis not provided.
Initializes the
AbstractAnnotationclass.- Parameters:
annotations (
Sequence[Variant] |Sequence[Interval]) – A sequence ofVariantorIntervalobjects.colors (
str|Sequence[str] |None) – An optional string or sequence of strings specifying colors.labels (
Sequence[str] |None) – An optional sequence of strings to use as labels.use_default_labels (
bool) – Whether to use default labels iflabelsis not provided.
- Raises:
ValueError – If the length of
colorsorlabelsdoes not match the length ofannotations.
Methods
|
Adds a single angled label to an axis. |
|
Adds the annotation to an individual axis. |
|
Adds labels for the annotation to an axis. |