Skip to content
Back to skills

Annotation Workflows

ASecurity

"Run CellTypist prediction and annotation workflows from Python or

  • 247 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 8, 2026
businesspythonshellbashapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill annotation-workflows --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Annotation Workflows?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Annotation Workflows
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-annotation-workflows/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-annotation-workflows)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: annotation-workflows
description: "Run CellTypist prediction and annotation workflows from Python or
  CLI for tables, Matrix Market, h5ad, and AnnData."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# CellTypist Annotation Workflows

Use this sub-skill when a task is about assigning CellTypist labels to query cells, validating annotation inputs, exporting prediction tables, or choosing between Python and CLI prediction workflows.

## Route quickly

- Use [API reference](references/api-reference.md) for `celltypist.annotate`, `Classifier`, `AnnotationResult`, best-match vs probability-match modes, majority voting, and result shapes.
- Use [data formats](references/data-formats.md) before running annotation on count tables, Matrix Market files, `.h5ad`, or in-memory `AnnData`.
- Use [CLI reference](references/cli-reference.md) when the user wants `celltypist --indata ...` commands, output flags, or batchable shell patterns.
- Use [troubleshooting](references/troubleshooting.md) for missing `.mtx` sidecar files, transposed matrices, normalization errors, model-feature mismatches, output-folder failures, majority-voting skips, GPU fallback, and cache/network surprises.
- Run [annotation_smoke.py](scripts/annotation_smoke.py) to create a tiny local model and query table in a temporary directory, annotate without network downloads, and verify prediction/result-table shapes.

## Stay in scope

- Keep model download, cache inventory, model conversion, model subsetting, and marker extraction in [model-management](../model-management/SKILL.md).
- Keep custom model training and downsampling strategy in [training-and-custom-models](../training-and-custom-models/SKILL.md); this sub-skill only uses a tiny synthetic model for smoke checks.
- Keep dotplots, UMAP figures, presentation plots, and result interpretation in [visualization-and-results](../visualization-and-results/SKILL.md).

## Default annotation pattern

Prefer an explicit local model path or loaded `Model` object when the user needs offline behavior. Leaving `model=None` or using built-in model names can consult CellTypist's model cache and may require network access if the cache is empty.

```python
import celltypist

predictions = celltypist.annotate(
    "query_counts.csv",
    model="local_model.pkl",
    mode="best match",
)

predictions.to_table(folder="results", prefix="query_")
adata = predictions.to_adata(insert_labels=True, insert_conf=True, insert_prob=True)
```

For CLI workflows, create the output directory first and use CLI mode names with underscores:

```bash
mkdir -p results
celltypist --indata query_counts.csv --model local_model.pkl --outdir results --prefix query_ --quiet
```

Files in this skill

  • SKILL.md2.7 KB
  • references/api-reference.md6.1 KB
  • references/cli-reference.md4.2 KB
  • references/data-formats.md5 KB
  • references/troubleshooting.md6.7 KB
  • scripts/annotation_smoke.py13 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.