mmc.terminal_names()
- mmochi.classifier.terminal_names(adata, obs_column='classification', confidence_column='certainty', conf_drops=None, key_added='lin', voting_reference=None, majority_min=.9)
Create a column in the .obs featuring the most specific classification/subset for each event. Uses horizonal concatenation (rightward has priority) of classifications in the adata.obsm[key_added]
- Parameters:
adata (AnnData object) – Object containing gene expression data, and expression data for modalities for every data key in .obsm
obs_column (str) – Column in the .obs to add to the AnnData containing the classification
confidence_column (str) – Column in the .obs to add to the AnnData containing the percent of trees in agreement with the classification
conf_drops (float or listlike of float) – Maximum percent of confidence-loss between levels of the hierarchy before an event should be terminated at an earlier subset
key_added (str) – Key in the adata object that contains the classification results
voting_reference (str) – Column in the .obs corresponding to leiden clusters or overclusters for use in the voting function (if majority voting)
majority_min (float [0,1]) – Proportion of events within an individual voting group that must agree for that voted identity to override all members of that voting group
- Returns:
AnnData – Contains a new column for classifications and potentially a column for confidences
- Return type:
AnnData object