single-popv-annotation
Installation
SKILL.md
PopV Population-Level Cell Type Annotation
PopV (Population Voting) annotates cell types by running up to 10 classification algorithms and aggregating predictions via majority voting. Unlike single-method annotation (SCSA, MetaTiME, CellTypist alone), PopV produces a consensus prediction that is more robust to individual algorithm failures. The module also supports ontology-aware voting via the Cell Ontology (CL) for hierarchical label resolution.
Defensive Validation
# Before PopV: verify reference has the cell type column
assert ref_labels_key in ref_adata.obs.columns, \
f"ref_adata.obs['{ref_labels_key}'] not found. Available: {list(ref_adata.obs.columns)}"
# Verify no NaN in reference labels
assert ref_adata.obs[ref_labels_key].notna().all(), \
f"NaN values in ref_adata.obs['{ref_labels_key}']. Use fillna() or drop these cells."