spatial-de

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

A differential-expression tool for spatial transcriptomics data. Differential expression means finding genes that differ between groups, such as tissue clusters or experimental conditions.

In plain words
What is it for?
Use it to rank cluster markers or run two-group comparisons on Visium, Xenium, MERFISH, or Slide-seq AnnData data.
Why use it?
It helps reveal marker genes for spatial clusters and gene changes between two groups while accounting for biological replicates when comparing conditions.

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-de
Any agent
npx skills add TianGzlab/OmicsClaw --skill spatial-de
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-de

README.md
[![agentmods](https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/spatial-de.svg)](https://agentmods.dev/skills/tiangzlab/omicsclaw/spatial-de)
Your own site
<a href="https://agentmods.dev/skills/tiangzlab/omicsclaw/spatial-de"><img src="https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/spatial-de.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,844 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00051 $0.01844
Opus 5 $0.00026 $0.00922
Sonnet 5 $0.00010 $0.00369
Haiku 4.5 $0.00005 $0.00184

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

Security

Grade A, and why

spatial-de 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 today.

The scan reads SKILL.md. This mod also ships 3 executable files (spatial_de.py, tests/__init__.py, tests/test_spatial_de.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-de/SKILL.md · 126 lines

How it starts

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

spatial-de

When to use

The user has a preprocessed spatial transcriptomics AnnData (Visium / Xenium / MERFISH / Slide-seq) and wants either (a) cluster-marker ranking via Scanpy wilcoxon / t-test, or (b) replicate-aware two-group condition DE via pydeseq2 pseudobulk. The wrapper exposes the official Scanpy filter controls and PyDESeq2 GLM controls directly, and refuses to fabricate replicates — pseudobulk requires a real sample_key.

Inputs & Outputs

Inputs

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

Outputs

  • tables/de_full.csv
  • tables/de_plot_points.csv
  • tables/de_run_summary.csv
  • tables/de_significant.csv
  • tables/de_spatial_points.csv
  • tables/de_umap_points.csv
  • tables/group_de_metrics.csv
  • tables/markers_top.csv
  • tables/sample_counts_by_group.csv
  • tables/skipped_sample_groups.csv
  • tables/top_de_hits.csv
  • figures/de_effect_burden_spatial.png
  • figures/de_effect_burden_umap.png
  • figures/de_group_spatial_context.png
  • figures/de_marker_dotplot.png
  • figures/de_marker_heatmap.png
  • figures/de_pvalue_distribution.png
  • figures/de_top_hits_barplot.png
  • figures/de_volcano.png
  • figures/group_de_burden.png
  • figures/sample_counts_by_group.png
  • figures/skipped_sample_groups.png
  • processed.h5ad
  • report.md
  • result.json
  • Processed AnnData (saves_h5ad)

Flow

  1. Load the preprocessed AnnData; if absent and not --demo, run spatial-preprocess first (raises RuntimeError at spatial_de.py:1370 if upstream script missing).
  2. Validate the matrix contract and method-specific arguments (Scanpy methods need X = log_normalized; pydeseq2 needs counts).
  3. For Scanpy paths: run rank_genes_groups and (default-on) the official filter_rank_genes_groups post-filter.
  4. For pydeseq2: pseudobulk by sample_key × group, drop bins below --min-cells-per-sample / --min-counts-per-gene, fit PyDESeq2 GLM. If the same biological sample is in both groups, auto-switch to paired design ~ sample_id + condition.
  5. Render the recipe-driven standard gallery.
  6. Write processed.h5ad, tables, figure_data/manifest.json, report.md, result.json, and reproducibility script.

Read the full file on GitHub · 126 lines

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. today First seen · 126 lines · 51 tokens per session scan A 5c579d367198

Subscribe to this mod's changes

spatial-de is a skill published in the GitHub repository TianGzlab/OmicsClaw (160 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 51 tokens to every session and 1,844 once invoked, about $0.0003 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-de

Differential expression analysis — find marker genes for clusters or compare two groups. Supports Wilcoxon rank-sum, t-test, and PyDESeq2 methods with publication-ready figures and CSV tables.

ShangBioLab/SpatialClaw · 44 tokens

spatial-condition-comparison

Experimental condition comparison using pseudobulk differential expression with proper multi-sample statistics.

ShangBioLab/SpatialClaw · 22 tokens

spatial-omics-integrate

Integrate two aligned spatial omics modalities on the same cells using SpatialGlue or SpaDDM. Standard input contract: --input --omics2 . Supports demo mode and validated modality pairs such as RNA+Protein and RNA+ATAC.

ShangBioLab/SpatialClaw · 70 tokens

pseudobulk_design_helper

Recommend a replicate-aware pseudobulk strategy for single-cell differential expression and explain the design choices.

Azealoo/miniAgent · 26 tokens

exploratory-data-analysis

Perform bounded, local exploratory analysis of explicitly supported scientific files. Use for redacted CSV/TSV/JSON profiles; optional NumPy, HDF5, FASTA/FASTQ, and basic image metadata inspection; missingness/leakage audits; outlier and transformation sensitivity; and rigorous EDA report scaffolds. Other domain…

K-Dense-AI/scientific-agent-skills · 83 tokens

geomaster

Comprehensive geospatial science skill covering remote sensing, GIS, spatial analysis, machine learning for earth observation, and 30+ scientific domains. Supports satellite imagery processing (Sentinel, Landsat, MODIS, SAR, hyperspectral), vector and raster data operations, spatial statistics, point cloud processing…

K-Dense-AI/scientific-agent-skills · 148 tokens