Skip to content
cccskills
FreePublished on GitHub

cell-annotation

Automated and marker-guided single-cell cell type annotation using CellTypist, marker review, reference transfer, and confidence-aware label curation.

The English summary is being prepared. Showing the original description.

See how to install

Files included (3)

  • SKILL.md4.5 KB
  • commands_and_thresholds.md1.3 KB
  • technical_reference.md1.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Cell Annotation

Version Compatibility

Reference examples assume:

  • scanpy 1.10+
  • celltypist 1.6+
  • pandas 2.2+

Before using code patterns, verify installed versions match the environment:

  • Python: python -c "import scanpy, celltypist; print(scanpy.__version__, celltypist.__version__)"
  • If APIs differ, inspect the installed docs and adapt the pattern instead of retrying unchanged.

Overview

Use this skill when the user wants cluster labels or per-cell labels for scRNA-seq. The default stance is:

  1. inspect markers first
  2. run reference-based annotation
  3. keep uncertainty explicit
  4. export both raw predicted labels and a curated final label column

When To Use This Skill

  • clusters already exist and need biological labels
  • the dataset has a relevant reference atlas or known marker panels
  • the user wants CellTypist or similar automated annotation

Quick Route

  • If clusters are unstable or clearly QC-driven, fix preprocessing before annotation.
  • If the atlas mismatch is severe, prefer broad lineage labels over overconfident fine labels.
  • If multiple methods disagree, mark labels as uncertain instead of forcing a consensus.

Progressive Disclosure

Default Rules

  • Never accept automated labels without checking marker expression.
  • Keep per-cell predictions and cluster-level curated labels separate.
  • Use Unknown, Uncertain, or Ambiguous when evidence is weak.
  • Document the reference model or atlas used.

Expected Inputs

  • processed h5ad with clusters and embeddings
  • marker gene lists or known lineage markers
  • optional reference atlas or model

Expected Outputs

  • results/annotated.h5ad
  • results/cell_labels.tsv
  • results/cluster_annotation_summary.tsv
  • figures/umap_cell_types.pdf
  • figures/marker_dotplot.pdf

Preferred Tools

  • scanpy
  • celltypist
  • pandas
  • matplotlib

Starter Pattern

import 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")

Workflow

1. Inspect markers before automation

Check canonical lineage markers on UMAP, dotplots, or heatmaps. If clusters do not support a plausible biological separation, do not lock in labels yet.

2. Choose the annotation level

  • broad lineage labels when the reference is imperfect
  • fine-grained labels only when markers and reference agree
  • cluster-level labels for noisy or sparse datasets

3. Run reference-based annotation

Use CellTypist or another compatible reference transfer method. Store:

  • raw label
  • confidence score
  • model name

4. Curate with markers and cluster context

Review top markers per cluster and compare them against predicted labels. Rename or collapse labels if fine categories are not robust.

5. Export both raw and final labels

At minimum, keep:

  • cell_type_raw
  • cell_type_confidence
  • cell_type_final

Output Artifacts

  • results/annotated.h5ad
  • results/cell_labels.tsv
  • results/cluster_annotation_summary.tsv
  • figures/umap_cell_types.pdf
  • figures/marker_dotplot.pdf

Quality Review

  • CellTypist 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.
  • Every final label should have either marker support, reference support, or both.

Anti-Patterns

  • assigning fine-grained labels only because the model returned them
  • overwriting raw labels so the original prediction is lost
  • treating low-confidence single-cell labels as publication-ready without review
  • hiding disagreements between marker evidence and reference transfer

Related Skills

  • scRNA Preprocessing And Clustering
  • Cell Communication
  • Trajectory And Lineage

Optional Supplements

  • scanpy
  • scvi-tools

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Workflow for read alignment, sorting, indexing, mapping statistics, and downstream-ready alignment artifacts.

The English summary is being prepared. Showing the original description.

BioTender-max/awesome-bio-agent-skills204Updated Jul 2, 2026

Validate protein designs using AlphaFold2 structure prediction. Use this skill when: (1) Validating designed sequences fold correctly, (2) Predicting binder-target complex structures, (3) Calculating confidence metrics (pLDDT, pTM, ipTM), (4) Self-consistency validation of designs, (5) Multi-chain complex prediction with AlphaFold-Multimer. For faster single-chain prediction, use esm. For QC thresholds, use protein-qc.

The English summary is being prepared. Showing the original description.

BioTender-max/awesome-bio-agent-skills204Updated Jul 2, 2026

AlphaFold2 / AlphaFold-Multimer structure prediction for validation and confidence scoring. Use this skill when: (1) Validating designed sequences fold correctly, (2) Predicting binder-target complex structures, (3) Calculating confidence metrics (pLDDT, pTM, ipTM), (4) Self-consistency validation of designs, (5) Multi-chain complex prediction with AlphaFold-Multimer. For faster single-chain prediction, use esm2-sequence-scoring. For QC thresholds, use protein-design-qc.

The English summary is being prepared. Showing the original description.

BioTender-max/awesome-bio-agent-skills204Updated Jul 2, 2026

Workflow for event-level and isoform-level splicing analysis with sashimi-ready outputs and splice QC.

The English summary is being prepared. Showing the original description.

BioTender-max/awesome-bio-agent-skills204Updated Jul 2, 2026

ATAC-seq processing with assay QC, MACS3 peak calling, consensus peak matrices, differential accessibility, and motif or footprint follow-up.

The English summary is being prepared. Showing the original description.

BioTender-max/awesome-bio-agent-skills204Updated Jul 2, 2026

End-to-end binder design using BindCraft hallucination. Use this skill when: (1) Designing protein binders with built-in AF2 validation, (2) Running production-quality binder campaigns, (3) Using different design protocols (fast, default, slow), (4) Need joint backbone and sequence optimization, (5) Want high experimental success rate. For backbone-only generation, use rfdiffusion. For QC thresholds, use protein-qc. For tool selection guidance, use binder-design.

The English summary is being prepared. Showing the original description.

BioTender-max/awesome-bio-agent-skills204Updated Jul 2, 2026

See all skills by BioTender-max

Report a problem with this skill