sc-batch-integration

sc-batch-integration is a skill for Claude Code, Codex from TianGzlab/OmicsClaw. It costs 70 tokens per session (1,544 once invoked), scanned A, original, Apache-2.0.

A single-cell analysis that combines cells from multiple samples while reducing technical differences between batches. Batch effects are measurement differences caused by separate experiments or processing runs.

In plain words
What is it for?
Use it on merged, preprocessed single-cell data from at least two samples. It compares several correction methods and reports how well the samples mix after correction.
Why use it?
Without correction, cells may group by sample instead of by their actual biology. This helps make clustering and cell-type analysis less dominated by those technical differences.

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/sc-batch-integration
Any agent
npx skills add TianGzlab/OmicsClaw --skill sc-batch-integration
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 sc-batch-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/sc-batch-integration.svg)](https://agentmods.dev/skills/tiangzlab/omicsclaw/sc-batch-integration)
Your own site
<a href="https://agentmods.dev/skills/tiangzlab/omicsclaw/sc-batch-integration"><img src="https://agentmods.dev/badge/skills/tiangzlab/omicsclaw/sc-batch-integration.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,544 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.00070 $0.01544
Opus 5 $0.00035 $0.00772
Sonnet 5 $0.00014 $0.00309
Haiku 4.5 $0.00007 $0.00154

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

Security

Grade A, and why

sc-batch-integration 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 4 executable files (sc_integrate.py, tests/__init__.py, tests/test_sc_integrate_methods.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/singlecell/scrna/sc-batch-integration/SKILL.md · 134 lines

How it starts

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

sc-batch-integration

When to use

The user has a merged multi-sample AnnData (post-sc-multi-count or similar) and needs to remove batch effects so downstream clustering / annotation isn't dominated by per-sample technical variation. Seven backends share one CLI: harmony (default), scvi, scanvi (requires labels), bbknn, scanorama, simba, plus R-backed methods (e.g. Seurat integration anchors). Quality is reported as LISI / ASW diagnostics when available.

Inputs & Outputs

Inputs

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

Outputs

  • tables/batch_mixing_matrix.csv
  • tables/batch_sizes.csv
  • tables/cell_metadata.csv
  • tables/cluster_sizes.csv
  • tables/embedding.csv
  • tables/integration_metrics.csv
  • tables/integration_summary.csv
  • tables/obs.csv
  • tables/umap.csv
  • tables/umap_points.csv
  • figures/batch_mixing_heatmap.png
  • figures/integration_metrics.png
  • figures/r_embedding_discrete.png
  • analysis_summary.txt
  • input.h5ad
  • processed.h5ad
  • report.md
  • result.json
  • Processed AnnData (saves_h5ad) — adds obsm: X_<method>, X_pca

Flow

  1. Load merged AnnData; resolve --batch-key (default batch).
  2. Validate backend prerequisites (e.g. scanvi needs --labels-key).
  3. Run the chosen --method; write the integrated embedding to obsm["X_<method>"] (BBKNN is the exception — it adjusts the neighbour graph in-place and leaves the embedding as obsm["X_pca"]).
  4. Compute LISI / ASW diagnostics (best-effort; non-fatal if unavailable).
  5. Emit summary + batch-composition + diagnostics tables.
  6. Save processed.h5ad + report.md + result.json.

Gotchas

  • scanvi silently falls back to scvi when labels are missing. sc_integrate.py:189-193 logs "scANVI requires labels; falling back to scVI latent integration" and writes result["requested_method"] = "scanvi", result["executed_method"] = "scvi", result["fallback_used"] = True. After every --method scanvi run, verify result.json["executed_method"] matches the request; --labels-key must be set and contain valid labels to actually get scANVI.
  • simba missing → hard fail. sc_integrate.py:242 raises ImportError when --method simba runs without the simba package installed. Install via pip install simba / conda install -c bioconda simba / from-source per the message. scvi-tools failures surface separately with their own ImportError further downstream.
  • Scanorama can return zero overlapping cells. sc_integrate.py:349 raises RuntimeError("Scanorama did not produce 'X_scanorama' embeddings") when batches share no genes (typical: gene-namespace mismatch). Pre-run sc-standardize-input on each batch.
  • R-backed methods can produce zero-overlap returns too. sc_integrate.py:400 raises RuntimeError(f"R integration method '{method}' returned no overlapping cells") for the same root cause.
  • LISI / ASW diagnostics are best-effort. sc_integrate.py:514 and :529 log "LISI diagnostics unavailable" / "ASW diagnostics unavailable" and continue when scIB or its dependencies are missing. Absence of metric rows in tables/integration_metrics.csv does not imply integration quality is bad — it means the diagnostics could not be computed.

Read the full file on GitHub · 134 lines

Files

What ships with it

9 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 · 134 lines · 70 tokens per session scan A 3579f3aa8f82

Subscribe to this mod's changes

sc-batch-integration is a skill published in the GitHub repository TianGzlab/OmicsClaw (160 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 70 tokens to every session and 1,544 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-integration

Multi-sample integration and batch correction for spatial transcriptomics data.

ShangBioLab/SpatialClaw · 18 tokens

spatial-multi-sample-integration

Multi-sample spatial transcriptomics integration and batch correction with automatic method selection (STAligner, Harmony, BBKNN, Scanorama) and robust fallback.

ShangBioLab/SpatialClaw · 41 tokens

Virtual Embryo — atlas data + knowledge graph

Query the Virtual Embryo knowledge graph (mouse/human developmental biology: genes, anatomy, Theiler/Carnegie stages, gene expression, diseases, papers) and its 3D atlas catalog (anatomical OPT/light-sheet volumes + 3D spatial- transcriptomics datasets), and visualise those datasets in 3D with the volume3d / spatial3d…

aristoteleo/PantheonOS · 170 tokens

batch_integration_advisor

Recommend a batch-integration strategy and explain the tradeoffs for preserving biology versus removing technical effects.

Azealoo/miniAgent · 25 tokens

pkpd-modeling

Pharmacokinetic and pharmacodynamic modelling and simulation - non-compartmental analysis, compartmental and population PK, PK/PD and exposure-response, TMDD, PBPK orientation, bioequivalence, allometric scaling and first-in-human dose, drug interaction prediction, and Bayesian therapeutic drug monitoring. Use when…

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

neuropixels-analysis

Analyze Neuropixels extracellular recordings end-to-end with SpikeInterface. Covers loading SpikeGLX/Open Ephys/NWB data, preprocessing, drift/motion correction, Kilosort4 (and CPU) spike sorting, quality metrics, and unit curation (threshold-based, model-based UnitRefine, and AI-assisted visual review). Use when…

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