sciagent-skill-creator
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md…
Tangram (tangram-sc) mapping of scRNA-seq onto spatial transcriptomics (Visium, Slide-seq, MERFISH, Xenium), one skill for every Tangram task: marker training genes, cells/clusters/constrained mode, per-spot cell type proportions, held-out gene validation (training scores,
$ npx -y skills add jaechang-hits/SciAgent-Skills --skill spatial-mapping-tangram --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/spatial-mapping-tangramContext preview
The summary Claude sees to decide when to auto-load this skill.
Tangram (tangram-sc) mapping of scRNA-seq onto spatial transcriptomics (Visium, Slide-seq, MERFISH, Xenium), one skill for every Tangram task: marker training genes, cells/clusters/constrained mode, per-spot cell type proportions, held-out gene validation (training scores,
name: "spatial-mapping-tangram" description: "Tangram (tangram-sc) mapping of scRNA-seq onto spatial transcriptomics (Visium, Slide-seq, MERFISH, Xenium), one skill for every Tangram task: marker training genes, cells/clusters/constrained mode, per-spot cell type proportions, held-out gene validation (training scores, compare_spatial_geneexp, AUC, k-fold CV), imputation of unmeasured or dropout genes (project_genes; gimVI alternative), and Visium deconvolution into segmented nuclei with the tissue image (squidpy watershed, target_count, deconvolve_cell_annotations). Task-specific routes follow the main workflow. For probabilistic spot abundances with uncertainty use spatial-transcriptomics-deconvolution-cell2location." license: "CC-BY-4.0"
Tangram fits a cell-by-spot probability matrix so that the expression of the mapped single cells reproduces the spatial expression of shared training genes. Every Tangram task starts from that matrix: per-spot cell type proportions, predicted expression of genes the panel did not measure, and, with a histology image, a cell type for every segmented nucleus. The mapping always converges to something, so this skill validates it on genes held out of training before any result is reported. The reference must come from the same tissue and state as the section and share informative genes with it.
| Task | Route | |---|---| | Cell type proportions per spot / labels on single-cell-resolution data | Workflow Steps 1-7 | | Predict unmeasured or dropout-affected genes | Steps 1-6, then Route: Gene Imputation | | One cell type per segmented nucleus (Visium + full-resolution image) | Route: Nuclei Deconvolution (replaces Step 1, then Steps 2-3, Nucleus 2-4, Step 6) | | Deeper quality checks (k-fold CV, cells vs clusters, seed stability) | After Step 6, Route: Advanced Validation |
All routes are in `## Task Routes` below the Workflow.
`spatial-transcriptomics-deconvolution-cell2location`; Xenium: Step 1 of `spatial-transcriptomics-cell-type-annotation`)
(search/download: Steps 3-4 of `spatial-transcriptomics-cell-type-annotation`, with `GENES = None` and `MAX_PER_TYPE = 300` - markers are ranked over every gene)
pre-installed; `tangram-sc` pulls PyTorch, whose Linux wheel brings CUDA libraries (several GB). The first install takes minutes; say so to the user before starting.
matrix plus optimiser state (roughly 16 bytes per entry): ~2 GB for 30k cells x 5k spots, but tens of GB for single-cell-resolution sections with 100k+ cells. Use `mode="clusters"` or subsample there (Step 4 prints the estimate).
# Install only what `import` reports missing. `--pypi` keeps the env's scanpy/numba # stack; a conda add can swap it and bare pip can shadow it. pixi add --pypi squidpy scanpy tangram-sc
decisions:
- id: D1
param: TASK
kind: required
source: user
ask: "What should the mapping give you: cell type proportions per spot (or labels per cell), predicted expression of genes the panel did not measure, or a cell type for every nucleus seen in the tissue image?"
default: "cell type proportions"
- id: D2
param: referenceSource
kind: required
source: user
ask: "Do you have a scRNA/snRNA-seq reference from the same tissue and state (h5ad with a cell type column), or should I search public data (CELLxGENE)?"
default: null
- id: D3
param: CELL_TYPE_KEY
kind: required
source: data
depends_on: [D2]
ask: "Which column of the reference holds the cell types to map?"
default: null
- id: D4
param: MODE
kind: required
source: user
depends_on: [D1]
ask: "Do the reference and the spatial section come from the same specimen (or a biological replicate), or from different samples/studies?"
default: "clusters when from different samples or when the Step 4 memory estimate exceeds the sandbox; cells otherwise; constrained for the nucleus task"
- id: D5
param: density_prior
kind: required
source: data
depends_on: [D1]
ask: "This section looks like <spot data / single-cell-resolution data>: weight each location by its RNA count, or treat every location as one cell?"
default: "per-spot total counts on spot data; uniform on single-cell-resolution data; nucleus counts for the nucleus task"
- id: D6
param: TARGETS
kind: required
source: user
depends_on: [D1]
skip_if: "TASK is not gene imputation"
ask: "Which genes or gene signatures do you want predicted on the tissue?"
default: null
- id: D7
param: STAIN
kind: required
source: data
depends_on: [D1]
skip_if: "TASK is not the nucleus task"
ask: "Is the full-resolution image H&E (dark nuclei) or fluorescent DAPI (bright nuclei)?"
default: null
- id: D8Turn your AI coding agent into a life sciences expert — 199 bioinformatics skills for Claude Code covering RNA-seq, single-cell analysis, genomics, proteomics, drug discovery, and more. Boosted BixBench from 65% to 92%. Open source.
Scaffold a new SciAgent-Skills entry. Picks pipeline/toolkit/database/guide template, creates skills/{category}/{name}/SKILL.md…
Bayesian modeling with PyMC 5: priors, likelihood, NUTS/ADVI sampling, diagnostics (R-hat, ESS), LOO/WAIC comparison, prediction.…
Time-to-event modeling with scikit-survival: Cox PH (elastic net), Random Survival Forests, Boosting, SVMs for censored data.…
Guided statistical analysis: test choice, assumption checks, effect sizes, power, APA reporting. Pick tests, verify assumptions,…
Python statistical modeling: regression (OLS, WLS, GLM), discrete (Logit, Poisson, NegBin), time series (ARIMA, SARIMAX, VAR),…
DL cell/nucleus segmentation for fluorescence and brightfield microscopy. Pre-trained models (cyto3, nuclei, tissuenet) and a…