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 ranking cluster-level marker genes from a clustered single-cell AnnData via Scanpy Wilcoxon / t-test / logreg or COSG specificity.
$ npx skills add TianGzlab/OmicsClaw --skill sc-markers -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install TianGzlab/OmicsClaw sc-markers --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-markers .claude/skills/sc-markers && 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-markers" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-markers into .claude/skills/sc-markers/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-markers", 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-markersType 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-markers -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install TianGzlab/OmicsClaw sc-markers --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-markers .agents/skills/sc-markers && 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-markers" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-markers into .agents/skills/sc-markers/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-markers", 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-markers -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install TianGzlab/OmicsClaw sc-markers --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-markers .cursor/skills/sc-markers && 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-markers" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-markers into .cursor/skills/sc-markers/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-markers", 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-markers--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-markers -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install TianGzlab/OmicsClaw sc-markers --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-markers .gemini/skills/sc-markers && 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-markers" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-markers into .gemini/skills/sc-markers/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-markers", 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-markersInstalls 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-markers -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-markers .github/skills/sc-markers && 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-markers" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-markers into .github/skills/sc-markers/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-markers", 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-markers -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-markers --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-markers .opencode/skills/sc-markers && 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-markers" agent skill from https://github.com/TianGzlab/OmicsClaw/tree/main/skills/singlecell/scrna/sc-markers into .opencode/skills/sc-markers/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "sc-markers", 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-markersLoad when ranking cluster-level marker genes from a clustered single-cell AnnData via Scanpy Wilcoxon / t-test / logreg or COSG specificity.
Sc Markers is an agent skill from TianGzlab/OmicsClaw. Load when ranking cluster-level marker genes from a clustered single-cell AnnData via Scanpy Wilcoxon / t-test / logreg or COSG specificity. Skip when comparing condition-vs-control with replicates (use sc-de); assigning cell-type labels (use sc-cell-annotation).
Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 12 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 Scanpy and 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.
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 Markers loads about 2.2k tokens when it runs, and up to ~3.7k if it reads all its reference files. Until then it costs about 69 tokens; SKILL.md has 884 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). 884 words, ~2,179 tokens.
.claude/skills/sc-markers/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.The user already has clustering / cell-type labels in obs (typically
leiden, louvain, or cell_type) and wants ranked marker genes per
group as evidence for downstream annotation or interpretation. Four
methods: wilcoxon (default rank-sum), t-test (Welch), logreg
(multinomial logistic regression — discriminative ranking), cosg
(fast cosine-specificity scoring without p-values). This is for
cluster markers, not condition contrasts — for treatment-vs-control
DE with replicates use sc-de.
markers = load_skill("sc-markers")
adata = read_input("results/02_cluster/intermediate/adata_clustered.h5ad")
table = markers.find_markers(adata, groupby="leiden")
write_output(table, "tables/markers_all.csv")
write_output(markers.top_markers(table), "tables/markers_top.csv")
write_output(markers.run_info(table), "tables/marker_run.json")A complete step on log-normalized PBMC expression is in examples/example_step.py.
<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
find_markers(adata, *, groupby: str, method: str='wilcoxon', n_genes: int | None=None, min_in_group_fraction: float=0.25, min_fold_change: float=0.25, max_out_group_fraction: float=0.5, mu: float=1.0) -> pd.DataFrameRank marker genes for each group against the rest using adata.X.
X should contain normalized expression. Computation uses a copy, so the input's matrices, obs and uns are unchanged. Scanpy methods apply the expression-fraction and fold-change filters; when filtering fails or removes every row, the unfiltered ranking is returned and run_info records filter_fallback and its reason. COSG scores specificity without p-values.
:param groupby: The obs column defining clusters or cell types. :param method: wilcoxon (default), t-test, logreg or cosg. :param n_genes: Genes ranked per group. None means all genes for Scanpy methods and 50 for COSG, matching the CLI defaults. :param min_in_group_fraction: Minimum expressing fraction within a group. Default 0.25; unused by COSG. :param min_fold_change: Fold-change filter passed to Scanpy. Default 0.25; unused by COSG. :param max_out_group_fraction: Maximum expressing fraction outside a group. Default 0.5; unused by COSG. :param mu: COSG specificity penalty. Default 1.0; unused by Scanpy methods. :returns: A DataFrame with group, names, scores and method-dependent effect, p-value and fraction columns. COSG pvals and pvals_adj are NaN. The table's attrs hold the run record; use run_info before CSV export. :raises ValueError: Unknown method or missing grouping column.
run_info(table: pd.DataFrame, *, keep: bool=True) -> dictReturn the method, grouping and filter-fallback record attached to a marker table.
:param keep: False removes the record from table.attrs; default True keeps it. :returns: A copy of the run record, or an empty dict for an unrecorded table. CSV files do not preserve attrs; write this record separately if needed.
top_markers(table: pd.DataFrame, *, n_top: int=10) -> pd.DataFrameReturn the top n_top rows per group, using adjusted p-value then effect.
Tables without finite adjusted p-values, including COSG, use scores. Otherwise logfoldchanges is the effect when available, falling back to scores.
cluster_summary(table: pd.DataFrame) -> pd.DataFrameReturn n_markers, top_gene, top_effect, median_effect and effect_metric per group.
The top gene uses the same ordering as top_markers. top_effect is the group's maximum effect, not necessarily that gene's effect. Use a row from top_markers when reporting a gene together with its effect size. Effect statistics use all returned markers in the group.
marker_dotplot_figure(adata, table: pd.DataFrame, *, groupby: str, n_top: int=5)Return a matplotlib Figure of marker expression in adata.X by group.
Dot size shows the expressing fraction; color shows mean expression. The top n_top markers per group are selected with top_markers.
<!-- api:end -->
The four methods and their interpretation are described in
references/methodology.md. find_markers uses X with use_raw=False.
For pbmc3k_processed or pbmc68k_reduced, take adata.raw.to_adata() to
use their log-normalized matrix; their X is scaled.
groupby explicitly names the labels to compare.method="wilcoxon" preserves the CLI default; t-test uses Welch's test,
logreg gives a discriminative ranking, and cosg gives specificity scores.n_genes=None ranks all genes for Scanpy methods and 50 per group for COSG.min_in_group_fraction=0.25,
min_fold_change=0.25 and max_out_group_fraction=0.5.mu=1.0 preserves the COSG specificity penalty; the other methods ignore it.top_markers(..., n_top=10) preserves the CLI's compact-summary size.tables/cluster_summary.csv, top_effect is the group's maximum, not
necessarily the effect of top_gene. Use the same row from top_markers
for a gene and its effect size (_api.py:132, cluster_summary).run_info(table)["filter_fallback"] is true when post-filtering failed or
removed every row. The function then returns the unfiltered ranking, as the
CLI did previously; read fallback_reason before interpreting the table.pvals and pvals_adj columns in tables/markers_all.csv contain NaN.
top_markers ranks those rows by scores; p-value filters must handle missing values._api.py:21 (find_markers) uses X without checking that it is log-normalized.
Supply the intended expression matrix explicitly.sc_markers.py:134 (_resolve_groupby) can choose a recognized label column for
the CLI. The function API requires groupby explicitly.logreg can return a Scanpy table without group, causing
_api.py:91 to raise KeyError. Use wilcoxon, t-test or COSG
for two groups; this existing Scanpy-wrapper limitation is unchanged.run_info(table) separately when
keeping the fallback record matters; the CLI stores it at
result.json["data"]["run_info"].find_markers reads X and the selected obs column, computes on a copy and
returns a DataFrame. The input AnnData is unchanged, including its uns entries.
top_markers and cluster_summary return tables; marker_dotplot_figure
returns a matplotlib Figure from X. These functions do not write files.
The CLI writes processed.h5ad, report.md, result.json,
tables/markers_all.csv, tables/markers_top.csv, tables/cluster_summary.csv,
and figure-data copies of those tables. Conditional figures and R outputs are
listed in references/output_contract.md.
# Demo (built-in PBMC3K with leiden labels)
python skills/singlecell/scrna/sc-markers/sc_markers.py --demo --output /tmp/sc_markers_demo
# Default Wilcoxon on leiden clusters
python skills/singlecell/scrna/sc-markers/sc_markers.py \
--input clustered.h5ad --output results/ --groupby leiden
# COSG fast specificity ranking on a labelled AnnData
python skills/singlecell/scrna/sc-markers/sc_markers.py \
--input annotated.h5ad --output results/ \
--groupby cell_type --method cosg --mu 1.0
# Strict marker filtering (high fold-change, low out-group fraction)
python skills/singlecell/scrna/sc-markers/sc_markers.py \
--input clustered.h5ad --output results/ \
--min-fold-change 1.0 --max-out-group-fraction 0.2references/parameters.md — every CLI flag and per-method tuning hintreferences/methodology.md — Wilcoxon vs t-test vs logreg vs COSG; when each winsreferences/output_contract.md — markers_all.csv column schema; figures' figure_data CSVssc-clustering (upstream — produces the leiden / louvain column), sc-cell-annotation (downstream — uses these markers as evidence for label assignment), sc-de (parallel — replicate-aware condition contrasts, NOT cluster markers)Python packages this skill's script needs. They are not installed for you — check before a long run.
anndata, matplotlib, numpy, pandas, scanpy, scikit-learn, scipy, seaborn
© 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 9 other files (references) in skills/singlecell/scrna/sc-markers of TianGzlab/OmicsClaw.
Open the folder on GitHubat commit 90a3bec
Sc Markers 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 Markers this skillTianGzlab/OmicsClaw | 161 | — | ~2.2k | Automated safety check: Pass | Apache-2.0 | |
| Scanpy Single-Cell Analysisdavila7/claude-code-templates | 32k | 15 repos | ~2.8k | Automated safety check: Pass | MIT | |
| Anndatadavila7/claude-code-templates | 32k | 11 repos | ~2.5k | Automated safety check: Pass | MIT | |
| ScanpyK-Dense-AI/scientific-agent-skills | 48k | 1 repos | ~5.1k | Automated safety check: Pass | BSD-3-Clause | |
| Cellxgene CensusK-Dense-AI/scientific-agent-skills | 48k | 1 repos | ~3.4k | Automated safety check: Notes | MIT | |
| Omics ToolsDrugClaw/DrugClaw | 125 | — | ~1.1k | Automated safety check: Pass | Apache-2.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
This skill should be used when working with annotated data matrices in Python, particularly for single-cell genomics analysis, managing experimental measurements with metadata, or handling…
K-Dense-AI/scientific-agent-skills
Performs Scanpy single-cell RNA-seq QC, normalization, HVG selection, PCA/UMAP/t-SNE, clustering, exploratory marker ranking, pseudobulk preparation, visualization, and Seurat or…
K-Dense-AI/scientific-agent-skills
Queries the CZ CELLxGENE Census programmatically for versioned public single-cell and spatial transcriptomics data.
DrugClaw/DrugClaw
Omics and single-cell workflow guide for AnnData, Scanpy-style dataset profiling, PyDESeq2-oriented count checks, pysam alignment inspection, and pyOpenMS mass-spectrometry summaries.
K-Dense-AI/scientific-agent-skills
Handles annotated matrices in single-cell analysis, .h5ad and Zarr files, and integration with the scverse ecosystem.
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.
Categories
Load when ranking cluster-level marker genes from a clustered single-cell AnnData via Scanpy Wilcoxon / t-test / logreg or COSG specificity. Sc Markers is an agent skill from TianGzlab/OmicsClaw. Load when ranking cluster-level marker genes from a clustered single-cell AnnData via Scanpy Wilcoxon / t-test / logreg or COSG specificity.
Sc Markers fits situations like: tasks that involve Bioinformatics.
Run `npx skills add TianGzlab/OmicsClaw --skill sc-markers -a claude-code`. Or copy the skill folder (skills/singlecell/scrna/sc-markers in TianGzlab/OmicsClaw) into .claude/skills/sc-markers in your project. Claude Code loads it when a task matches its description.
Run `npx skills add TianGzlab/OmicsClaw --skill sc-markers -a codex`. Or copy the skill folder (skills/singlecell/scrna/sc-markers in TianGzlab/OmicsClaw) into .agents/skills/sc-markers 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-markers -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-markers, .gemini/skills/sc-markers, .github/skills/sc-markers and .opencode/skills/sc-markers in your project.
Going by SKILL.md and its folder, Sc Markers 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 Markers 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 8.7k 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 1.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Sc Markers: Scanpy Single-Cell Analysis (davila7/claude-code-templates, 32k stars), Anndata (davila7/claude-code-templates, 32k stars), Scanpy (K-Dense-AI/scientific-agent-skills, 48k stars) and Cellxgene Census (K-Dense-AI/scientific-agent-skills, 48k 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.