biotender-max/cell-annotation
Automated and marker-guided single-cell cell type annotation using CellTypist, marker review, reference transfer, and confidence-aware label curation.
npx skills add https://github.com/BioTender-max/awesome-bio-agent-skills --skill cell-annotation
Reference examples assume:
scanpy 1.10+celltypist 1.6+pandas 2.2+Before using code patterns, verify installed versions match the environment:
python -c "import scanpy, celltypist; print(scanpy.__version__, celltypist.__version__)"Use this skill when the user wants cluster labels or per-cell labels for scRNA-seq. The default stance is:
Unknown, Uncertain, or Ambiguous when evidence is weak.h5ad with clusters and embeddingsresults/annotated.h5adresults/cell_labels.tsvresults/cluster_annotation_summary.tsvfigures/umap_cell_types.pdffigures/marker_dotplot.pdfscanpycelltypistpandasmatplotlibimport scanpy as sc
import celltypist
adata = sc.read_h5ad("results/processed.h5ad")
pred = celltypist.annotate(adata, model="Immune_All_Low.pkl", majority_voting=True)
adata = pred.to_adata()
adata.obs["cell_type_raw"] = adata.obs["majority_voting"]
adata.obs["cell_type_confidence"] = adata.obs["conf_score"]
adata.write("results/annotated.h5ad")
Check canonical lineage markers on UMAP, dotplots, or heatmaps. If clusters do not support a plausible biological separation, do not lock in labels yet.
Use CellTypist or another compatible reference transfer method. Store:
Review top markers per cluster and compare them against predicted labels. Rename or collapse labels if fine categories are not robust.
At minimum, keep:
cell_type_rawcell_type_confidencecell_type_finalresults/annotated.h5adresults/cell_labels.tsvresults/cluster_annotation_summary.tsvfigures/umap_cell_types.pdffigures/marker_dotplot.pdfCellTypist conf_score > 0.5 is usually comfortable for a provisional label.0.2-0.5 should be manually reviewed against markers.< 0.2 should usually remain Unknown or Uncertain unless markers are compelling.scanpyscvi-toolsTake biotender-max/cell-annotation from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.