Scanpy Single-Cell Analysis
davila7/claude-code-templates
Walks through single-cell RNA-seq analysis with Scanpy: loading .h5ad and 10X data, QC, normalization, PCA and UMAP, Leiden clustering, marker genes and cell type annotation.
Load when removing ambient RNA contamination from droplet-based scRNA-seq using a simple subtraction path, CellBender, or SoupX.
$ npx skills add TianGzlab/OmicsClaw --skill sc-ambient-removal -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install TianGzlab/OmicsClaw sc-ambient-removal --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/singlecell/scrna/sc-ambient-removal .claude/skills/sc-ambient-removal && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "sc-ambient-removal" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-ambient-removal into .claude/skills/sc-ambient-removal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-ambient-removal", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-ambient-removalType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add TianGzlab/OmicsClaw --skill sc-ambient-removal -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install TianGzlab/OmicsClaw sc-ambient-removal --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/singlecell/scrna/sc-ambient-removal .agents/skills/sc-ambient-removal && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "sc-ambient-removal" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-ambient-removal into .agents/skills/sc-ambient-removal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-ambient-removal", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add TianGzlab/OmicsClaw --skill sc-ambient-removal -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install TianGzlab/OmicsClaw sc-ambient-removal --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/singlecell/scrna/sc-ambient-removal .cursor/skills/sc-ambient-removal && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "sc-ambient-removal" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-ambient-removal into .cursor/skills/sc-ambient-removal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-ambient-removal", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/TianGzlab/OmicsClaw.git --path skills/singlecell/scrna/sc-ambient-removal--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add TianGzlab/OmicsClaw --skill sc-ambient-removal -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install TianGzlab/OmicsClaw sc-ambient-removal --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/singlecell/scrna/sc-ambient-removal .gemini/skills/sc-ambient-removal && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "sc-ambient-removal" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-ambient-removal into .gemini/skills/sc-ambient-removal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-ambient-removal", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install TianGzlab/OmicsClaw sc-ambient-removalInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add TianGzlab/OmicsClaw --skill sc-ambient-removal -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/singlecell/scrna/sc-ambient-removal .github/skills/sc-ambient-removal && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "sc-ambient-removal" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-ambient-removal into .github/skills/sc-ambient-removal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-ambient-removal", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add TianGzlab/OmicsClaw --skill sc-ambient-removal -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install TianGzlab/OmicsClaw sc-ambient-removal --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/singlecell/scrna/sc-ambient-removal .opencode/skills/sc-ambient-removal && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "sc-ambient-removal" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-ambient-removal into .opencode/skills/sc-ambient-removal/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-ambient-removal", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
sc-ambient-removalLoad when removing ambient RNA contamination from droplet-based scRNA-seq using a simple subtraction path, CellBender, or SoupX.
Sc Ambient Removal is an agent skill from TianGzlab/OmicsClaw. Load when removing ambient RNA contamination from droplet-based scRNA-seq using a simple subtraction path, CellBender, or SoupX. Skip when the contamination is multiplet barcodes (use sc-doublet-detection); before counts exist (use sc-count).
Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including reference files (for example `_api.py`, `examples/example_step.py` and `references/methodology.md`).
It sits in Research & Science, covering Bioinformatics. It works with AnnData. The repository describes itself as: Conversational & memory-enabled AI research partner for multi-omics analysis. CLI + Desktop App (installers in Releases). From biological idea to full research paper. The licence is Apache-2.0.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 90a3bec. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships script files (Python), which the agent can run.
Shell commands in SKILL.md call:
pythonFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Sc Ambient Removal loads about 2.2k tokens when it runs, and up to ~5.1k if it reads all its reference files. Until then it costs about 65 tokens; SKILL.md has 900 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from TianGzlab/OmicsClaw at commit 90a3bec, republished under its Apache-2.0 licence (© TianGzlab). 900 words, ~2,238 tokens.
.claude/skills/sc-ambient-removal/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.The user has filtered (or raw + filtered) droplet-based scRNA-seq counts
and suspects ambient RNA from cell-free droplets is inflating per-cell
expression — typical for 10X data with high droplet density. Three
backends share the CLI: simple (a deterministic ambient-profile
subtraction, default), cellbender (Python, requires GPU for sensible
runtime), and soupx (Rscript; needs raw + filtered matrices).
Doublets are a different problem — use sc-doublet-detection for
multiplet barcodes.
ambient = load_skill("sc-ambient-removal")
adata = ambient.remove_ambient(read_input("counts.h5ad"), contamination=0.05)
write_output(ambient.correction_summary(adata), "tables/correction_summary.csv")
write_output(ambient.correction_figure(adata), "figures/counts_comparison.png")
write_output(adata, "intermediate/adata_corrected.h5ad")With raw droplets, use remove_ambient_soupx(filtered, raw=raw_droplets).
CellBender remains CLI-only because it uses an external process and files.
The simple-method example is in examples/example_step.py.
<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
remove_ambient(adata, *, contamination: float=0.05)Subtract a mean ambient profile from count-like expression in place.
Select layers['counts'], aligned raw or X; retain that matrix in layers['counts'] and replace X with nonnegative corrected values. The mean cell profile is only an approximation when empty droplets are absent.
:param adata: AnnData with a count-like expression matrix. :param contamination: Fraction to subtract before clipping at zero, in [0, 1). Default 0.05, matching the CLI. :returns: The same AnnData; run_info reports the matrix source and reduction. :raises ValueError: No count-like matrix exists or contamination is invalid.
remove_ambient_soupx(adata, *, raw)Return SoupX-corrected cells, using raw droplet counts to estimate ambient RNA.
Both objects select counts from layers['counts'], aligned raw or X and exchange temporary 10x matrices with R. This backend does not expose a seed through its wrapper; results vary between runs. Errors propagate.
:param adata: AnnData containing the filtered cells. :param raw: AnnData containing raw droplets, with matching feature names. :returns: A new AnnData aligned to SoupX's retained cells and genes, with original counts in layers['counts'] and corrected X. :raises RuntimeError: R, Seurat or SoupX is unavailable, or the method fails. :raises ValueError: Counts are missing or the result cannot be aligned.
run_info(adata, *, keep: bool=True) -> dictRead JSON correction diagnostics from adata.uns.
:param adata: AnnData returned by a correction function. :param keep: False removes the diagnostics after reading; default True. :returns: Matrix source, method and before/after count summaries.
correction_summary(adata) -> pd.DataFrameReturn the recorded count reduction as a one-row table.
:param adata: AnnData returned by a correction function. :returns: Mean counts, reduction_pct, contamination_estimate and method.
counts_comparison_table(adata) -> pd.DataFrameCompare per-cell original counts in layers['counts'] with corrected X.
:param adata: AnnData returned by a correction function. :returns: cell_id, counts_before and counts_after in observation order.
ambient_profile_table(adata) -> pd.DataFrameReturn the mean original-count profile used by simple subtraction.
:param adata: Corrected AnnData with original counts in layers['counts']. :returns: gene and fraction columns. This is not SoupX's estimated profile.
correction_figure(adata)Plot original versus corrected counts per cell and return the Figure.
:param adata: AnnData returned by a correction function. :returns: A matplotlib Figure for write_output.
<!-- api:end -->
remove_ambient selects counts from layers["counts"], aligned raw, then
X, saves them in layers["counts"] and replaces X in place. The
contamination=0.05 default retains the CLI's fixed subtraction fraction;
it is not an estimated biological contamination rate. The profile is the
mean across input cells, an approximation when no empty droplets exist.
This path is deterministic and needs no optional backend.
remove_ambient_soupx requires R, Seurat and SoupX. It exchanges compressed
10x matrices in a temporary directory and returns a new, aligned AnnData.
Its wrapper exposes no seed, so results may vary. Unlike the compatibility
CLI, the API propagates backend errors; it does not fall back to simple
subtraction. run_info records the method, count source and reduction.
Inputs
file, directory.h5ad, .h5, .loom, .csv, .tsvOutputs
figures/barcode_rank.pngfigures/count_distribution.pngfigures/counts_comparison.pngfigure_data/ and its manifest, including correction summary and gene expressionfigures/r_enhanced/ only for successful --r-enhanced renderscellbender_output/ only when CellBender runs; files depend on its backend outputprocessed.h5adreport.mdresult.jsonsaves_h5ad) — adds layers: counts; uns: ambient_correction, soupx, cellbender--contamination is in [0, 1) and --expected-cells is positive when set.--method against METHOD_REGISTRY.simple.layers["counts"] and overwrite adata.X with the corrected counts; record the run params in uns["ambient_correction"|"soupx"|"cellbender"].report.md + result.json.simple when a backend or its inputs are missing.
Check result.json["summary"]["executed_method"] and fallback_reason.
The SoupX API instead raises on failure.--contamination is bounded to [0, 1) (left-inclusive). sc_ambient.py checks 0 <= float(args.contamination) < 1 and raises ValueError("--contamination must be between 0 and 1 (for example 0.05).") otherwise. 0 is allowed (degenerate no-op); 1 and 5.0 (the common typo for 0.05) both fail loudly.--expected-cells must be a positive integer. sc_ambient.py raises ValueError. Zero or negative values fail loudly here rather than producing a degenerate run.--raw-matrix-dir and --filtered-matrix-dir silently falls back to simple. sc_ambient.py logs "SoupX requires --raw-matrix-dir and --filtered-matrix-dir. Falling back to simple subtraction." and continues with the simple path. result.json records the fallback in summary["fallback_reason"]; CellBender uses just the filtered matrix and the simple path uses neither.# Demo (simple subtraction)
python skills/singlecell/scrna/sc-ambient-removal/sc_ambient.py --demo --output /tmp/sc_ambient_demo
# CellBender on a 10X-filtered AnnData
python skills/singlecell/scrna/sc-ambient-removal/sc_ambient.py \
--input filtered.h5ad --output results/ \
--method cellbender --raw-h5 raw_feature_bc_matrix.h5 --expected-cells 8000
# SoupX with explicit raw + filtered matrices
python skills/singlecell/scrna/sc-ambient-removal/sc_ambient.py \
--input filtered.h5ad --output results/ \
--method soupx \
--raw-matrix-dir cellranger_out/raw_feature_bc_matrix \
--filtered-matrix-dir cellranger_out/filtered_feature_bc_matrixreferences/parameters.md — every CLI flag and per-method tuning hintreferences/methodology.md — when each backend wins, ambient profile derivation, R/Python tradeoffsreferences/output_contract.md — layers["counts"] (pre-correction) and .X (corrected) semantics, per-method uns diagnosticssc-doublet-detection (parallel — multiplet barcodes, complementary contamination class), sc-filter (upstream — cell QC), sc-preprocessing (downstream — normalise/HVG/PCA on the cleaned counts)Python packages this skill's script needs. They are not installed for you — check before a long run.
anndata, cellbender, matplotlib, numpy, pandas, scanpy, scipy, torch
© TianGzlab, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 8 other files (references) in skills/singlecell/scrna/sc-ambient-removal of TianGzlab/OmicsClaw.
Open the folder on GitHubat commit 90a3bec
Sc Ambient Removal next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Sc Ambient Removal this skillTianGzlab/OmicsClaw | 161 | — | ~2.2k | Automated safety check: Pass | Apache-2.0 | |
| Scanpy Single-Cell Analysisdavila7/claude-code-templates | 33k | 15 repos | ~2.8k | Automated safety check: Pass | MIT | |
| PyDESeq2 Differential Expressiondavila7/claude-code-templates | 33k | 11 repos | ~4k | Automated safety check: Pass | MIT | |
| Single-Cell Initial AnalysisLigphiDonk/Oh-my--paper | 739 | 1 repos | ~1.4k | Automated safety check: Pass | MIT | |
| Anndataaipoch/medical-research-skills | 1.9k | — | ~1.7k | Automated safety check: Pass | MIT | |
| Multiomics StatisticsVectorSpaceLab/AREX-Skill | 331 | — | ~1k | Automated safety check: Pass | GPL-3.0 |
davila7/claude-code-templates
Walks through single-cell RNA-seq analysis with Scanpy: loading .h5ad and 10X data, QC, normalization, PCA and UMAP, Leiden clustering, marker genes and cell type annotation.
davila7/claude-code-templates
Runs differential gene expression analysis on bulk RNA-seq counts with PyDESeq2: design formulas, Wald tests, FDR correction and volcano or MA plots.
LigphiDonk/Oh-my--paper
Runs a seven-step quality-control and exploration pipeline on scRNA-seq, CyTOF or flow cytometry data and writes a plain-language report of what it found.
aipoch/medical-research-skills
Data structure for annotated matrices in single-cell analysis; use when reading/writing .h5ad (or zarr) and exchanging data with the scverse ecosystem.
VectorSpaceLab/AREX-Skill
A skill your agent uses for OmicVerse bulk RNA-seq, enrichment/signature scoring, metabolomics, proteomics, microbiome, and statistical table workflows.
JimLiu/science-skills
Embed and annotate single-cell expression data with scGPT, a foundation model for single-cell biology.
TianGzlab/OmicsClaw
Load when the user needs Deterministic fixed-period 24-hour single-component cosinor OLS rhythm analysis for a bulk RNA time-course CSV.
TianGzlab/OmicsClaw
Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation.
TianGzlab/OmicsClaw
Load when discovering bulk gene co-expression modules and hub genes with R WGCNA.
TianGzlab/OmicsClaw
Load when comparing gene expression between two conditions in bulk RNA-seq count data.
TianGzlab/OmicsClaw
Load when estimating cell-type proportions in bulk RNA-seq samples from a single-cell or signature-matrix reference.
TianGzlab/OmicsClaw
Load when running pathway / GO term enrichment on a bulk RNA-seq DE result list.
Works with
Categories
Load when removing ambient RNA contamination from droplet-based scRNA-seq using a simple subtraction path, CellBender, or SoupX. Sc Ambient Removal is an agent skill from TianGzlab/OmicsClaw. Load when removing ambient RNA contamination from droplet-based scRNA-seq using a simple subtraction path, CellBender, or SoupX.
Sc Ambient Removal fits situations like: tasks that involve Bioinformatics.
Run `npx skills add TianGzlab/OmicsClaw --skill sc-ambient-removal -a claude-code`. Or copy the skill folder (skills/singlecell/scrna/sc-ambient-removal in TianGzlab/OmicsClaw) into .claude/skills/sc-ambient-removal in your project. Claude Code loads it when a task matches its description.
Run `npx skills add TianGzlab/OmicsClaw --skill sc-ambient-removal -a codex`. Or copy the skill folder (skills/singlecell/scrna/sc-ambient-removal in TianGzlab/OmicsClaw) into .agents/skills/sc-ambient-removal in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TianGzlab/OmicsClaw --skill sc-ambient-removal -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sc-ambient-removal, .gemini/skills/sc-ambient-removal, .github/skills/sc-ambient-removal and .opencode/skills/sc-ambient-removal in your project.
Going by SKILL.md and its folder, Sc Ambient Removal needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Sc Ambient Removal is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.9k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Sc Ambient Removal: Scanpy Single-Cell Analysis (davila7/claude-code-templates, 33k stars), PyDESeq2 Differential Expression (davila7/claude-code-templates, 33k stars), Single-Cell Initial Analysis (LigphiDonk/Oh-my--paper, 739 stars) and Anndata (aipoch/medical-research-skills, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
TianGzlab (a GitHub organization) maintains it in TianGzlab/OmicsClaw, which has 161 GitHub stars. The repository holds 88 skills in this directory. The repository was last updated on October 7, 2026.
Source: TianGzlab/OmicsClaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.