/datascales-skills:datascales-workflowfrom datascales-skills
Plans large-scale single-cell/spatial data analysis using AnnData on Zarr, Icechunk versioning, and rapids-singlecell on GPU. Start here for out-of-memory or shared datasets.
Ships in datascales-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
DataScales is a set of tools and measured habits for single-cell data that outgrows one
.h5ad: one AnnData store on Zarr v3, built with annizarr, versioned with
Icechunk, analysed out-of-core with rapids-singlecell and Dask on a GPU. Everything here
works on any machine. map.md lists the team's projects and Code Ocean capsules;
name a capsule only when the task matches one closely.
Say so and stop. Plain scanpy on an .h5ad is the better choice when the data is small, and easily fits in
memory, one person uses it and it will not grow. The scope is small 1 time analysis.
A store is worth building when samples keep arriving, several people share the data, or the
matrix does not fit in memory. Seurat objects and MuData must be exported to .h5ad first.
| Step | What happens | Skill |
|---|---|---|
| 1. Build one store | Convert the .h5ad / 10x files to one Zarr store, raw counts in CSR X, cells sorted by the label people filter on | zarr-for-single-cell |
2. Keep every cell on main | Build the store as an Icechunk repository. main holds every cell as ingested and is changed only by ingest | icechunk-analysis-history |
| 3. QC makes the curated store | Compute metrics, agree thresholds with the person, write only the passing cells to branch qc, record the decision | below |
| 4. Analyse on the GPU | Read the curated cells in blocks: normalize, HVG, PCA, neighbors, UMAP, Leiden | rapids-out-of-core |
| 5. Write small results back | Embeddings, labels and settings go into the store, one commit per step with a message. X is not rewritten | icechunk-analysis-history |
Spatial data (Xenium, Atera) follows the same steps on the cell table; see spatial-on-gpu.
The history is the default, not an extra. The person will ask for clusters, QC or a UMAP, not for Icechunk. Whenever these steps apply, do steps 2 and 5 without being asked and tell the person where the repository is. Use plain Zarr only if they ask for it.
Full pipeline, load to Leiden, on internal PBMC data. Every number is a single run. Out of core capabilities should be considered depending on GPU memory size and or the dataset size neighbors step is usually when GPU memory is at its peak. Managed memory is a great option
| Cells | scanpy on CPU | rapids, 1× A100 80 GB |
|---|---|---|
| 2M | 1 h 37 min | 2.1 min |
| 5M | 3 h 49 min, 295 GB RAM | 8.5 min |
| 13.8M | did not fit in memory | 23.7 min |
| about 30M | not run | about 46 min, GPU memory full |
What the workflow adds to QC is small: every cell stays on main, branch qc becomes the
curated store with only the cells that passed, and the decision is recorded. Thresholds
are per dataset. Show the person the
distributions and the number of cells each rule removes, and confirm before applying.
| Rule | Starting value (scRNA, PBMC) | Spatial panels (Xenium, Atera) |
|---|---|---|
| Genes per cell | keep 200 < genes < 5000 | at least 5 genes |
| Counts per cell | none | at least 20 transcripts |
| Mitochondrial % | below 10 | not used: most panels have no MT genes |
| Doublets | drop Scrublet calls | at least 1 nucleus; Scrublet is not built for spatial |
Record the thresholds and counts in the store and the commit metadata.
icechunk-analysis-history has the code, which writes the passing cells band by band so the
store never has to fit in memory. If the person asked for plain Zarr, write the passing
cells to a new store and keep the raw one. Gene filtering, ambient RNA and cell labelling are separate work.
These are the team's defaults, not rules. State them and ask before a long run.
| Step | Starting value |
|---|---|
| Rows per Dask block | 24,000 |
| Normalize | target_sum=1e4, then log1p |
| Highly variable genes | 2,000, flavor seurat |
| Scale | max_value=10, zero_center=False |
| PCA | 50 components |
| Batch correction | Harmony, only if the person names a batch column |
| Neighbors | 20 neighbors on the first 30 PCs, ivfflat |
| UMAP | min_dist=0.45, spectral init |
| Leiden | resolution 1.1 |
The institute's CPU notebooks use other values (50 neighbors, min_dist=0.05, Leiden 1.0),
so results will differ from an earlier CPU run. Ask which the person wants to match.
Single runs; hardware beside each number in the topic skills.
X as CSR and add a CSC layer for gene reads.main. --branch names the branch written.
To read another branch, pass az.Repo(path, branch="qc") in Python.if __name__ == "__main__":. It starts
worker processes, and without the guard the call fails on macOS.| Need | Skill |
|---|---|
| Layout, sort order, chunks, building or editing the store | zarr-for-single-cell |
| GPU cluster, loading in blocks, the analysis calls, slow or out-of-memory runs | rapids-out-of-core |
| Commits, branches, reading an earlier state, writing the curated store after QC | icechunk-analysis-history |
| Xenium or Atera tables, spatial graph, niches | spatial-on-gpu |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
5 skills in this plugin
/icechunk-analysis-historyKeeps the history of an analysis inside an Icechunk repository holding an AnnData store, with commits and branches through annizarr. Use by default whenever a Zarr store is built or results are saved into one, and when someone wants to version or snapshot a single-cell store, keep raw counts safe while analysing, give each person or analysis a branch, save QC results or clusters as a commit with the settings that made them, read or compare an earlier state, undo a step, or avoid keeping a full copy of the data per analysis stage. Not for choosing the store layout, and not for versioning code./rapids-out-of-coreRuns rapids-singlecell on a GPU over a Zarr AnnData store that is larger than GPU or host memory, reading cells in Dask blocks. Use when someone wants to normalize, find variable genes, run PCA, neighbors, UMAP or Leiden on millions of cells on a GPU, set up a Dask-CUDA cluster, choose managed memory or a pool, size a GPU for a dataset, or when a GPU run is slow, runs out of memory, or does not speed up with more GPUs. Not for building the store or for spatial statistics./spatial-on-gpuAnalyses spatial transcriptomics cell tables (10x Xenium, Atera, or any SpatialData table with cell coordinates) with rapids-singlecell on a GPU. Use when someone wants spatial QC, a spatial neighbor graph, tissue niches or zones, neighborhood enrichment, co-occurrence, ligand-receptor analysis or spatially variable genes on a GPU, wants to combine several spatial samples, or asks how a SpatialData store fits with Zarr and Icechunk. Not for segmentation, image processing or dissociated scRNA.npx claudepluginhub aifimmunology/datascales --plugin datascales-skills