spatial-cnv

spatial-cnv is a skill for Claude Code, Codex from TianGzlab/OmicsClaw. It costs 93 tokens per session (1,951 once invoked), scanned A, original, Apache-2.0.

A workflow that estimates copy-number variation for spots in spatial transcriptomics data. Copy-number variation means that tumour cells have gained or lost sections of chromosomes compared with a normal reference.

In plain words
What is it for?
Use it to calculate per-spot copy-number scores, summarise genomic regions, and support tumour-versus-normal or clone deconvolution analyses.
Why use it?
It helps separate tumour and normal regions and can identify groups of spots with similar chromosome-level changes. An optional method also uses allele counts to improve clone analysis.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/tiangzlab/omicsclaw/spatial-cnv
Any agent
npx skills add TianGzlab/OmicsClaw --skill spatial-cnv
Clone the repo
git clone --depth 1 https://github.com/TianGzlab/OmicsClaw

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for spatial-cnv

README.md
[![agentmods](https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/spatial-cnv.svg)](https://agentmods.dev/skills/tiangzlab/omicsclaw/spatial-cnv)
Your own site
<a href="https://agentmods.dev/skills/tiangzlab/omicsclaw/spatial-cnv"><img src="https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/spatial-cnv.svg" alt="Measured on agentmods" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,951 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00093 $0.01951
Opus 5 $0.00046 $0.00975
Sonnet 5 $0.00019 $0.00390
Haiku 4.5 $0.00009 $0.00195

Measured yesterday against content hash ada7cb51a38a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

spatial-cnv scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 2 executable files (spatial_cnv.py, tests/test_spatial_cnv.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/spatial/spatial-cnv/SKILL.md · 133 lines

How it starts

The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.

spatial-cnv

When to use

The user has a preprocessed spatial AnnData with gene-coordinate metadata in var["chromosome"] / var["start"] / var["end"] and wants per-spot copy-number variation inferred for tumour / normal deconvolution. Two backends:

  • infercnvpy (default) — log-ratio sliding-window over chromosomes using infercnvpy. Tunables --window-size, --step, --infercnv-lfc-clip, --infercnv-chunksize, --infercnv-n-jobs.
  • numbat — R-based, allele-aware clone deconvolution using phased SNP allele counts. Requires obsm["allele_counts"]. Tunables --numbat-genome (hg19/hg38), --numbat-max-entropy, --numbat-min-llr, --numbat-min-cells, --numbat-ncores.

--reference-key <obs col> + --reference-cat <category> define the normal-reference subset (strongly recommended).

Inputs & Outputs

Inputs

  • File types: .h5ad
  • Requires a preprocessed AnnData (X normalised, PCA/neighbours present)
  • Expects obsm: spatial, allele_counts

Outputs

  • tables/allele_counts.csv
  • tables/cnv_bin_summary.csv
  • tables/cnv_group_sizes.csv
  • tables/cnv_run_summary.csv
  • tables/cnv_scores.csv
  • tables/cnv_spatial_points.csv
  • tables/cnv_umap_points.csv
  • tables/numbat_calls.csv
  • tables/numbat_clone_post.csv
  • tables/numbat_results.csv
  • figures/cnv_bin_summary.png
  • figures/cnv_group_sizes.png
  • figures/cnv_groups_umap.png
  • figures/cnv_heatmap.png
  • figures/cnv_score_distribution.png
  • figures/cnv_spatial.png
  • figures/cnv_umap.png
  • figures/cnv_uncertainty_distribution.png
  • figures/cnv_uncertainty_spatial.png
  • numbat_input.h5ad
  • processed.h5ad
  • report.md
  • result.json
  • Processed AnnData (saves_h5ad) — adds obs: cnv_score, cnv_leiden, numbat_p_cnv, numbat_clone, numbat_entropy; uns: numbat_calls, numbat_clone_post

Read the full file on GitHub · 133 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 133 lines · 93 tokens per session scan A ada7cb51a38a

Subscribe to this mod's changes

spatial-cnv is a skill published in the GitHub repository TianGzlab/OmicsClaw (160 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 93 tokens to every session and 1,951 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

spatial-cnv

Copy number variation inference from spatial transcriptomics expression data using Python-native inferCNVpy.

ShangBioLab/SpatialClaw · 23 tokens

scanpy

Standard single-cell RNA-seq analysis pipeline. Use for QC, normalization, dimensionality reduction (PCA/UMAP/t-SNE), clustering, differential expression, and visualization. Best for exploratory scRNA-seq analysis with established workflows. For deep learning models use scvi-tools; for data format questions use…

synthetic-sciences/openscience · 68 tokens

cellxgene-census-query

Query CZ CELLxGENE Census (61M+ cells). Filter by cell type/tissue/disease, retrieve expression data, and integrate with scanpy/PyTorch for population-scale single-cell analysis. Use this skill when: (1) Querying single-cell expression data by cell type, tissue, or disease, (2) Exploring available single-cell datasets…

PharMolix/OpenBioMed · 105 tokens

single-cell-scrna-seq-analysis-scanpy

Complete single-cell RNA-seq analysis workflow built on Scanpy and AnnData. Use this skill when: (1) Loading diverse single-cell data formats (10X, h5ad, CSV), (2) Performing quality control and filtering, (3) Normalization, dimensionality reduction, and clustering, (4) Marker gene identification and cell type…

PharMolix/OpenBioMed · 85 tokens

single-cell-multi-omics-analysis-scvi

Probabilistic deep learning framework for single-cell multi-omics data analysis. Use this skill when: (1) Analyzing single-cell RNA-seq data with batch correction, (2) Integrating multi-modal data (CITE-seq, ATAC-seq, multi-omics), (3) Performing cell type annotation with scANVI, (4) Spatial transcriptomics…

PharMolix/OpenBioMed · 94 tokens

functional-analysis

Understand the biological meaning of gene sets through pathway and functional enrichment analysis. Use when user has gene lists (DEGs, markers, SVGs) and wants to know what pathways or functions they represent. Triggers: "pathway analysis", "enrichment", "GSEA", "GO terms", "what pathways", "biological function"…

cafferychen777/ChatSpatial · 87 tokens