add_cluster_annotation
- Cluster.add_cluster_annotation(annotation, to_col, from_col=None, colors=None)[source]
Add annotation and colormap to clustering.
Is saved in
{cluster_name}_annotation.csv- Parameters
annotation (Mapping[str, str]) – Dict mapping from values of
from_colto the annotation.to_col (str) – Name under which the annotation should be saved.
from_col (str | None) – Optionally set the annotation name from which to annotate. Default is
cluster_name.colors (Mapping[str, str] | None) – Colour dict, mapping from annotations to hex colours. Default is using tab20 colormap.
- Return type
None