IntervalAnnotation#
- class alphagenome.visualization.plot_components.IntervalAnnotation(intervals, colors='darkgray', alpha=0.2, labels=None, use_default_labels=True, label_angle=15)[source]#
Visualizes intervals as rectangles across all plot components.
A rectangle is drawn for each interval and overlaid on top of the final plot, spanning all plot components.
Initializes the
IntervalAnnotationclass.- Parameters:
intervals (
Sequence[Interval]) – A sequence ofIntervalobjects to annotate.colors (
str|Sequence[str] (default:'darkgray')) – An optional string or sequence of strings specifying the colors of the interval annotation.alpha (
float(default:0.2)) – The transparency of the interval annotation.labels (
Sequence[str] |None(default:None)) – An optional sequence of strings to use as labels for the intervals.use_default_labels (
bool(default:True)) – Whether to use default labels for the intervals iflabelsis not provided.label_angle (
float(default:15)) – The angle of the interval labels.
Methods
|
Adds a single angled label to an axis. |
|
Adds the interval annotation to an individual axis. |
|
Adds interval labels to an axis. |