Agent skill

Sc Pathway Scoring

by TianGzlab in TianGzlab/OmicsClaw

Load when computing per-cell pathway / gene-set scores on a normalised scRNA AnnData via AUCell (R or Python) or Scanpy scoregenes.

Apache-2.0Auto-check passedResearch & Science

Install Sc Pathway Scoring

skills CLI
$ npx skills add TianGzlab/OmicsClaw --skill sc-pathway-scoring -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install TianGzlab/OmicsClaw sc-pathway-scoring --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/TianGzlab/OmicsClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/singlecell/scrna/sc-pathway-scoring .claude/skills/sc-pathway-scoring && rm -rf skills-src

Use ~/.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/

Facts

Skill name
sc-pathway-scoring
GitHub stars
161
Token cost
~2.2k tokens
SKILL.md length
759 words
Files
12 (incl. references)
Skills in repo
88
Repo updated
First seen
Licence
Apache-2.0

At a glance

Load when computing per-cell pathway / gene-set scores on a normalised scRNA AnnData via AUCell (R or Python) or Scanpy scoregenes.

  • Works in 7 steps: Load AnnData (--input) or build a demo. → Load gene sets: parse --gene-sets GMT,… → Validate: at least one gene-set member… → …
  • Tasks that involve Bioinformatics
  • SKILL.md covers When to use, Use in an analysis step, Inputs & Outputs and Flow, plus 5 more sections
  • Runs Python and R scripts from its folder; calls python

What it does

Sc Pathway Scoring is an agent skill from TianGzlab/OmicsClaw. Load when computing per-cell pathway / gene-set scores on a normalised scRNA AnnData via AUCell (R or Python) or Scanpy scoregenes. Skip when running condition-vs-control bulk-style enrichment on top of a DE table (use sc-enrichment); de-novo gene-program discovery (use sc-gene-programs).

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 15 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 Python, AnnData and Scanpy. 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.

When your agent uses it

  • Tasks that involve Bioinformatics

Example prompts

  • “/sc-pathway-scoring”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Load AnnData (--input) or build a demo.
  2. Load gene sets: parse --gene-sets GMT, OR fetch via --gene-set-db and write a resolved GMT.
  3. Validate: at least one gene-set member overlaps the input features (feature_label_source chosen from var_names / var["gene_symbol"] / etc.).
  4. Run preflight; resolve --groupby (auto-pick from leiden / louvain / cell_type if unset).
  5. Dispatch to method
  6. Compute group-aware aggregates if --groupby is set.
  7. Save tables, figures, processed.h5ad, report.md, result.json.

What it can do on your machine

Read from SKILL.md and the folder at commit 90a3bec. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Ships script files (Python and R), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sc Pathway Scoring loads about 2.2k tokens when it runs, and up to ~4.2k if it reads all its reference files. Until then it costs about 77 tokens; SKILL.md has 759 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.2k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from TianGzlab/OmicsClaw at commit 90a3bec, republished under its Apache-2.0 licence (© TianGzlab). 759 words, ~2,226 tokens.

Download SKILL.mdSave it as .claude/skills/sc-pathway-scoring/SKILL.md (or your agent's skills folder). This skill also uses 11 other files; get the full folder from GitHub.
name
sc-pathway-scoring
description
Load when computing per-cell pathway / gene-set scores on a normalised scRNA AnnData via AUCell (R or Python) or Scanpy score_genes. Skip when running condition-vs-control bulk-style enrichment on top of a DE table (use sc-enrichment); de-novo gene-program discovery (use sc-gene-programs).
trigger
pathway score, pathway scoring, gene set score, module score, pathway activity, signature score
tags
singlecell, scrna, pathway-scoring, aucell, scanpy-score-genes, gene-sets, decoupler

sc-pathway-scoring

When to use

The user has a normalised scRNA AnnData and a gene-set library (GMT file or one of the built-in DB aliases: hallmark, kegg, reactome, go_bp, ...) and wants per-cell scores quantifying how active each gene set is. Three methods:

  • aucell_r (default) — R-backed AUCell via decoupler-py-style bridge. Best statistical foundation; requires R env.
  • aucell_py — Python AUCell (--aucell-py-auc-threshold). Pure Python.
  • score_genes_py — Scanpy tl.score_genes per gene set. Lightest and fastest.

Output: tables/enrichment_scores.csv (cells × gene_sets), plus group-mean / group-high-fraction tables when --groupby is provided.

For bulk-style condition-vs-control GSEA / ORA on a DE table use sc-enrichment. For de-novo gene-program discovery use sc-gene-programs.

Use in an analysis step

Use load_skill from the notebook SDK; write returned objects with write_output. This runnable example is also in examples/example_step.py. The CLI remains available for standalone reports and galleries.

python
# Score PBMC lineage gene sets with the Python AUCell implementation.
# Reads pbmc3k_processed and uses its log-normalized raw snapshot.
# Calls sc-pathway-scoring: score_gene_sets, group_scores, score_distribution_figure.

from skills._sdk.notebook import load_demo, load_skill, write_output

pathways = load_skill('sc-pathway-scoring')
adata = load_demo('pbmc3k_processed').raw.to_adata()
gene_sets = {
    'B_cell': ['MS4A1', 'CD79A', 'CD79B', 'CD74', 'HLA-DRA'],
    'T_cell': ['CD3D', 'CD3E', 'CD3G', 'TRAC', 'IL7R'],
    'Myeloid': ['LYZ', 'S100A8', 'S100A9', 'FCN1', 'CTSS'],
}

scores = pathways.score_gene_sets(adata, gene_sets, method='aucell_py')
write_output(scores, 'tables/pathway_scores.csv')
write_output(pathways.group_scores(adata, scores, groupby='louvain'), 'tables/group_scores.csv')
write_output(pathways.score_distribution_figure(scores), 'figures/score_distribution.png')

assert scores.index.equals(adata.obs_names)
assert set(scores.columns) == set(gene_sets)
assert scores.max().max() > 0
assert scores.min().min() >= 0

Inputs & Outputs

Input is an AnnData and gene sets keyed by name. The CLI reads H5AD plus a GMT file or an Enrichr library. Python scoring returns a cell-by-set DataFrame; attach_scores returns a copy with obs["enrich__..."] columns.

The CLI writes processed.h5ad, report.md, result.json, and tables/enrichment_scores.csv, gene_set_overlap.csv, top_pathways.csv. Grouped runs also write group_mean_scores.csv and group_high_fraction.csv. Plot source tables live under figure_data/, not tables/. R exchange matrices and AUCell CSVs are temporary.

Flow

  1. Load AnnData (--input) or build a demo.
  2. Load gene sets: parse --gene-sets GMT, OR fetch via --gene-set-db <alias> and write a resolved GMT.
  3. Validate: at least one gene-set member overlaps the input features (feature_label_source chosen from var_names / var["gene_symbol"] / etc.).
  4. Run preflight; resolve --groupby (auto-pick from leiden / louvain / cell_type if unset).
  5. Dispatch to method:
    • aucell_r: shell out to bundled R script via RScriptRunner.
    • aucell_py: AUCell-Python with --aucell-py-auc-threshold.
    • score_genes_py: Scanpy tl.score_genes per gene set.
  6. Compute group-aware aggregates if --groupby is set.
  7. Save tables, figures, processed.h5ad, report.md, result.json.

Gotchas

  • run_info(scores)["skipped_gene_sets"] lists sets with no matching features. Inspect tables/gene_set_overlap.csv before interpreting scores; all-unmatched Python input raises.
  • score_gene_sets(..., method="score_genes_py") requires normalized X. AUCell ranks expression and can also use counts.
  • load_gene_sets downloads named libraries through gseapy. Local GMT/JSON avoids network access. This skill's mouse kegg alias is KEGG_2021_Mouse, intentionally separate from sc-enrichment's aliases.
  • aucell_r needs AUCell and GSEABase. Its temporary result must contain a Cell column; otherwise the API raises instead of misaligning rows.
  • API scoring uses seed 42 by default. The CLI preserves its historical score_genes_py seed 0; its AUCell seed defaults to 42. Set random_state=0 for API/CLI score_genes comparisons.
  • processed.h5ad adds an enrich__ obs column per gene set. attach_scores copies its input; score_gene_sets leaves it unchanged.
  • CLI --demo slices the first 60 feature names into four arbitrary sets. They exercise the pipeline, not biological pathways. The step below uses named PBMC lineage genes.

Key CLI

bash
# Demo (built-in gene sets)
python skills/singlecell/scrna/sc-pathway-scoring/sc_pathway_scoring.py --demo --output /tmp/sc_pw_demo

# AUCell-R with MSigDB Hallmark, grouped by cell type
python skills/singlecell/scrna/sc-pathway-scoring/sc_pathway_scoring.py \
  --input clustered.h5ad --output results/ \
  --gene-set-db hallmark --groupby cell_type

# AUCell-Python (no R needed) with custom GMT
python skills/singlecell/scrna/sc-pathway-scoring/sc_pathway_scoring.py \
  --input clustered.h5ad --output results/ \
  --method aucell_py --gene-sets pathways.gmt --groupby leiden

# Scanpy score_genes for fast prototyping
python skills/singlecell/scrna/sc-pathway-scoring/sc_pathway_scoring.py \
  --input clustered.h5ad --output results/ \
  --method score_genes_py --gene-sets pathways.gmt
Show full SKILL.md (331 more words)Show less

See also

  • references/parameters.md — every CLI flag, library aliases
  • references/methodology.md — AUCell vs score_genes; gene-symbol expectations
  • references/output_contract.md — enrichment_scores.csv schema; per-method differences
  • Adjacent skills: sc-clustering / sc-cell-annotation (upstream — produce --groupby column for group-aware aggregates), sc-enrichment (parallel — bulk-style GSEA/ORA on DE tables, NOT per-cell scoring), sc-gene-programs (parallel — de-novo factorisation, NOT supervised scoring against curated sets), sc-grn (parallel — TF-target regulons; AUCell is shared underlying tech)

Dependencies

Python packages this skill's script needs. They are not installed for you — check before a long run.

anndata, gseapy, matplotlib, numpy, pandas, scanpy, scipy, seaborn

API

<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
score_gene_sets(adata, gene_sets, *, method: str='aucell_r', auc_max_rank: int | None=None, auc_threshold: float=0.05, ctrl_size: int=50, n_bins: int=25, random_state: int=42) -> pd.DataFrame

Return cell-by-gene-set scores without changing adata.

aucell_py ranks X, breaking ties with random_state; auc_threshold is the fraction of ranked genes used. score_genes_py requires normalized X and uses Scanpy control genes. aucell_r requires AUCell/GSEABase and uses normalized X or an aligned raw matrix. R exchange files are temporary. Gene sets with no matched features are skipped; all-unmatched input fails. API seeds default to 42. The historical score_genes CLI uses seed 0.

load_gene_sets(source, *, species: str='human') -> dict[str, list[str]]

Read a GMT or JSON file, or download an Enrichr library.

Aliases belong to this skill: mouse KEGG resolves to KEGG_2021_Mouse. Named libraries require gseapy and network access; local files do not.

attach_scores(adata, scores: pd.DataFrame)

Return a copy with enrich__ columns and the scoring run record in uns.

gene_set_overlap(adata, gene_sets) -> pd.DataFrame

Return matched feature counts and identifiers for every requested gene set.

group_scores(adata, scores: pd.DataFrame, *, groupby: str) -> pd.DataFrame

Return mean scores per obs group, retaining every scored gene set.

top_pathways(scores: pd.DataFrame, *, n: int=20) -> pd.DataFrame

Rank gene sets by mean absolute cell score, breaking ties by name.

score_summary(adata, scores_df: pd.DataFrame, *, groupby: str | None, top_pathways: int) -> dict[str, object]

Return top pathways, grouped means, high fractions and long-form scores.

score_distribution_figure(scores: pd.DataFrame)

Return a boxplot of per-cell scores without writing files.

run_info(result, *, keep: bool=True) -> dict

Return scoring provenance; keep=False removes the AnnData or table run record.

<!-- api:end -->

© 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

Files

SKILL.md and 11 other files (references) in skills/singlecell/scrna/sc-pathway-scoring of TianGzlab/OmicsClaw.

  • SKILL.md
  • _api.py
  • examples/example_step.py
  • references/methodology.md
  • references/output_contract.md
  • references/parameters.md
  • references/r_visualization.md
  • rscripts/sc_aucell.R
  • sc_pathway_scoring.py
  • tests/test_pathway_api.py
  • tests/test_sc_pathway_scoring.py
  • tests/test_sc_pathway_scoring_methods.py

Open the folder on GitHubat commit 90a3bec

Compare with similar skills

Sc Pathway Scoring 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.

Sc Pathway Scoring compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sc Pathway Scoring this skillTianGzlab/OmicsClaw161—~2.2kAutomated safety check: PassApache-2.0
Anndatadavila7/claude-code-templates32k11 repos~2.5kAutomated safety check: PassMIT
ScanpyK-Dense-AI/scientific-agent-skills48k1 repos~5.1kAutomated safety check: PassBSD-3-Clause
AnndataK-Dense-AI/scientific-agent-skills48k1 repos~3.9kAutomated safety check: NotesBSD-3-Clause
Bio Single Cell Data IoFreedomIntelligence/OpenClaw-Medical-Skills3.1k1 repos~2kAutomated safety check: PassNone
Bio Flow Cytometry Fcs HandlingGPTomics/bioSkills1.2k1 repos~2.5kAutomated safety check: PassMIT

Similar skills

  • Anndata

    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…

    32k GitHub starsUsed in 11 repos~2.5k tokens
    Research & ScienceAuto-check passed
  • Scanpy

    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…

    48k GitHub starsUsed in 1 repo~5.1k tokens
    Research & ScienceAuto-check passed
  • Anndata

    K-Dense-AI/scientific-agent-skills

    Handles annotated matrices in single-cell analysis, .h5ad and Zarr files, and integration with the scverse ecosystem.

    48k GitHub starsUsed in 1 repo~3.9k tokens
    Research & ScienceAuto-check: notes
  • Bio Single Cell Data Io

    FreedomIntelligence/OpenClaw-Medical-Skills

    Read, write, and create single-cell data objects using Seurat (R) and Scanpy (Python).

    3.1k GitHub starsUsed in 1 repo~2k tokens
    Research & ScienceAuto-check passed
  • Reads, inspects, and writes Flow Cytometry Standard (FCS) files from conventional, spectral, and mass cytometry (CyTOF), and parses FlowJo/Cytobank/Diva workspaces.

    1.2k GitHub starsUsed in 1 repo~2.5k tokens
    Research & ScienceAuto-check passed
  • Stores and operates on sparse expression matrices for single-cell and large bulk RNA-seq, covering dgCMatrix/dgRMatrix/dgTMatrix when-each-is-fast, the dgCMatrix (CSC, R) <- CSR (Python) implicit…

    1.2k GitHub starsUsed in 1 repo~5.6k tokens
    Research & ScienceAuto-check passed

More from TianGzlab/OmicsClaw

All 88 skills in this repo
  • Bulkrna Cosinor Rhythm

    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.

    161 GitHub stars~840 tokensUpdated yesterday
    Auto-check passed
  • Bulkrna Batch Correction

    TianGzlab/OmicsClaw

    Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation.

    161 GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Bulkrna Coexpression

    TianGzlab/OmicsClaw

    Load when discovering bulk gene co-expression modules and hub genes with R WGCNA.

    161 GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Bulkrna De

    TianGzlab/OmicsClaw

    Load when comparing gene expression between two conditions in bulk RNA-seq count data.

    161 GitHub stars~867 tokensUpdated yesterday
    Auto-check passed
  • Bulkrna Deconvolution

    TianGzlab/OmicsClaw

    Load when estimating cell-type proportions in bulk RNA-seq samples from a single-cell or signature-matrix reference.

    161 GitHub stars~757 tokensUpdated yesterday
    Auto-check passed
  • Bulkrna Enrichment

    TianGzlab/OmicsClaw

    Load when running pathway / GO term enrichment on a bulk RNA-seq DE result list.

    161 GitHub stars~860 tokensUpdated yesterday
    Auto-check passed

Questions about Sc Pathway Scoring

What does Sc Pathway Scoring do?

Load when computing per-cell pathway / gene-set scores on a normalised scRNA AnnData via AUCell (R or Python) or Scanpy scoregenes. Sc Pathway Scoring is an agent skill from TianGzlab/OmicsClaw. Load when computing per-cell pathway / gene-set scores on a normalised scRNA AnnData via AUCell (R or Python) or Scanpy scoregenes.

When should I use Sc Pathway Scoring?

Sc Pathway Scoring fits situations like: tasks that involve Bioinformatics.

How do I install Sc Pathway Scoring in Claude Code?

Run `npx skills add TianGzlab/OmicsClaw --skill sc-pathway-scoring -a claude-code`. Or copy the skill folder (skills/singlecell/scrna/sc-pathway-scoring in TianGzlab/OmicsClaw) into .claude/skills/sc-pathway-scoring in your project. Claude Code loads it when a task matches its description.

How do I install Sc Pathway Scoring in Codex?

Run `npx skills add TianGzlab/OmicsClaw --skill sc-pathway-scoring -a codex`. Or copy the skill folder (skills/singlecell/scrna/sc-pathway-scoring in TianGzlab/OmicsClaw) into .agents/skills/sc-pathway-scoring in your project. Codex loads it when a task matches its description.

Can I use Sc Pathway Scoring in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add TianGzlab/OmicsClaw --skill sc-pathway-scoring -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-pathway-scoring, .gemini/skills/sc-pathway-scoring, .github/skills/sc-pathway-scoring and .opencode/skills/sc-pathway-scoring in your project.

What does Sc Pathway Scoring need to run?

Going by SKILL.md and its folder, Sc Pathway Scoring needs Python and R for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Sc Pathway Scoring access the network?

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.

Is Sc Pathway Scoring safe to install?

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.

What licence does Sc Pathway Scoring use?

Sc Pathway Scoring 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.

How many tokens does Sc Pathway Scoring use?

About 2.2k tokens (SKILL.md is roughly 8.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 1.9k tokens, read only when the agent opens those files.

What are the alternatives to Sc Pathway Scoring?

Skills that share tags, products or a category with Sc Pathway Scoring: Anndata (davila7/claude-code-templates, 32k stars), Scanpy (K-Dense-AI/scientific-agent-skills, 48k stars), Anndata (K-Dense-AI/scientific-agent-skills, 48k stars) and Bio Single Cell Data Io (FreedomIntelligence/OpenClaw-Medical-Skills, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sc Pathway Scoring?

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.