cell-annotation
Skill27 starsChanged 8 months agoMITView on GitHub
Automated and marker-guided single-cell cell type annotation using CellTypist, marker review, reference transfer, and confidence-aware label curation.
In this repository43 other files it gives its agents.
- alignment-and-mappingSkill
- database-accessSkill
- read-qcSkill
- reporting-and-figure-exportSkill
- sequence-and-format-ioSkill
- workflow-managementSkill
- ehr-analysisSkill
- atac-seqSkill
- chip-seqSkill
- epitranscriptomicsSkill
- gene-regulatory-networksSkill
- hi-c-3d-genomicsSkill
- methylation-analysisSkill
- comparative-genomicsSkill
- copy-numberSkill
- genome-assemblySkill
- long-read-genomicsSkill
- phasing-imputationSkill
- variant-callingSkill
- metagenomicsSkill
- microbiome-ampliconSkill
- pathogen-epi-genomicsSkill
- phylogeneticsSkill
- causal-genomicsSkill
- machine-learning-for-omicsSkill
- multi-omics-integrationSkill
- pathway-analysisSkill
- systems-biologySkill
- imaging-mass-cytometrySkill
- metabolomicsSkill
- proteomicsSkill
- structural-biologySkill
- cell-communicationSkill
- multiome-scatacSkill
- scrna-preprocessing-clusteringSkill
- spatial-transcriptomicsSkill
- trajectory-lineageSkill
- alternative-splicingSkill
- bulk-rna-expressionSkill
- differential-expressionSkill
- ribo-seqSkill
- rna-quantificationSkill
- small-rna-seqSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. About 0 are common, 14 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Before using code patterns, verify installed versions match the environment:
- Distinctive: line 21
If APIs differ, inspect the installed docs and adapt the pattern instead of retrying unchanged.
- Distinctive: line 25
Use this skill when the user wants cluster labels or per-cell labels for scRNA-seq.
- Distinctive: line 40
If clusters are unstable or clearly QC-driven, fix preprocessing before annotation.
- Distinctive: line 41
If the atlas mismatch is severe, prefer broad lineage labels over overconfident fine labels.
- Distinctive: line 42
If multiple methods disagree, mark labels as uncertain instead of forcing a consensus.
- Distinctive: line 46
Read technical_reference.md for strategy selection, confidence interpretation, and disagreement handling.
- Distinctive: line 47
Read commands_and_thresholds.md for concrete CellTypist code, score thresholds, and output columns.
- Distinctive: line 51
Never accept automated labels without checking marker expression.
- Distinctive: line 52
Keep per-cell predictions and cluster-level curated labels separate.
- Very specific: line 53
Use Unknown, Uncertain, or Ambiguous when evidence is weak.
- Distinctive: line 54
Document the reference model or atlas used.
- Distinctive: line 95
Check canonical lineage markers on UMAP, dotplots, or heatmaps.
- Distinctive: line 105
Use CellTypist or another compatible reference transfer method.
- Distinctive: line 136
Every final label should have either marker support, reference support, or both.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Cell Annotation
Version Compatibility
Reference examples assume:
scanpy1.10+celltypist1.6+pandas2.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:
- inspect markers first
- run reference-based annotation
- keep uncertainty explicit
- 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
- Read technical_reference.md for strategy selection, confidence interpretation, and disagreement handling.
- Read commands_and_thresholds.md for concrete CellTypist code, score thresholds, and output columns.
Default Rules
- Never accept automated labels without checking marker expression.
- Keep per-cell predictions and cluster-level curated labels separate.
- Use
Unknown,Uncertain, orAmbiguouswhen evidence is weak. - Document the reference model or atlas used.
Expected Inputs
- processed
h5adwith clusters and embeddings - marker gene lists or known lineage markers
- optional reference atlas or model
Expected Outputs
results/annotated.h5adresults/cell_labels.tsvresults/cluster_annotation_summary.tsvfigures/umap_cell_types.pdffigures/marker_dotplot.pdf
Preferred Tools
scanpycelltypistpandasmatplotlib
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_rawcell_type_confidencecell_type_final
Output Artifacts
results/annotated.h5adresults/cell_labels.tsvresults/cluster_annotation_summary.tsvfigures/umap_cell_types.pdffigures/marker_dotplot.pdf
Quality Review
CellTypist conf_score > 0.5is usually comfortable for a provisional label.0.2-0.5should be manually reviewed against markers.< 0.2should usually remainUnknownorUncertainunless 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
scanpyscvi-tools
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

