VariantAnnotation#
- class alphagenome.visualization.plot_components.VariantAnnotation(variants, colors='orange', alpha=0.8, labels=None, use_default_labels=True, label_angle=15, label_position='left')[source]#
Visualizes variants as thin line-like rectangles across plot components.
Initializes the
VariantAnnotationclass.- Parameters:
variants (
Sequence[Variant]) – A sequence ofVariantobjects to annotate.colors (
str|Sequence[str] (default:'orange')) – An optional string or sequence of strings specifying the colors of the variant annotation.alpha (
float(default:0.8)) – The transparency of the variant annotation.labels (
Sequence[str] |None(default:None)) – An optional sequence of strings to use as labels for the variants.use_default_labels (
bool(default:True)) – Whether to use default labels for the variants iflabelsis not provided.label_angle (
float(default:15)) – The angle of the variant labels.label_position (
str(default:'left')) – The (horizontal) placement of the variant label, relative to the variant position. Can be any position string accepted by the horizontalalignment argument of matplotlib.axes.Axes.text.
Methods
|
Adds a single angled label to an axis. |
|
Adds a variant annotation to an individual axis. |
|
Adds variant labels to an axis. |