scviva.tools.vision.compute_plasticity_scores#
- scviva.tools.vision.compute_plasticity_scores(adata, newick)[source]#
Compute per-cell Fitch-Hartigan parsimony plasticity scores.
For every categorical variable in
adata.obs, a{var}_plasticitycolumn is added toadata.obs. The score for cell c is the average normalised Fitch-Hartigan parsimony across all internal nodes on the path from the tree root to c.High plasticity: the metadata label switches often along the lineage path → the trait is labile / plastic.
Low plasticity: the label is conserved along the lineage path.
Mirrors R VISION’s
computePlasticityScores().