- spac.data_utils.combine_annotations(adata: AnnData, annotations: list, separator: str, new_annotation_name: str) AnnData [source]
Combine multiple annotations into a new annotation using a defined separator.
- Parameters:
adata (AnnData) – The input AnnData object whose .obs will be modified.
annotations (list) – List of annotation column names to combine.
separator (str) – Separator to use when combining annotations.
new_annotation_name (str) – The name of the new annotation to be created.
- Returns:
The AnnData object with the combined annotation added.
- Return type:
AnnData