pegasus.annotate¶
-
pegasus.
annotate
(data, name, based_on, anno_dict)[source]¶ Add annotation to AnnData obj.
- Parameters
data (AnnData) – AnnData object.
name (str) – Name of the new annotation in data.obs.
based_on (str) – Name of the attribute the cluster ids coming from.
anno_dict (Dict[str, str]) – Dictionary mapping from cluster id to cell type.
- Returns
- Return type
None
Examples
>>> annotate_cluster.annotate(data, 'anno', 'spectral_louvain_labels', {'1': 'T cell', '2': 'B cell'})