bulkrna-batch-correcti…
Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation. Skip…
Load when running bulk-style pathway enrichment (ORA / GSEA / GSEA-R / GSVA-R) on a per-group
$ npx -y skills add tiangzlab/omicsclaw --skill sc-enrichment --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sc-enrichmentContext preview
The summary Claude sees to decide when to auto-load this skill.
Load when running bulk-style pathway enrichment (ORA / GSEA / GSEA-R / GSVA-R) on a per-group
name: sc-enrichment description: Load when running bulk-style pathway enrichment (ORA / GSEA / GSEA-R / GSVA-R) on a per-group ranked DE / marker list against a gene-set library. Skip when computing per-cell pathway scores in-place (use sc-pathway-scoring); de-novo gene-program discovery (use sc-gene-programs). trigger: sc enrichment, single-cell enrichment, GO enrichment, KEGG enrichment, GSEA, ORA, pathway enrichment tags: - singlecell - scrna - enrichment - gsea - ora - gsva - decoupler - pathway-enrichment
Test named gene sets against per-group marker/DE rankings with ORA or GSEA. GSVA scores mean expression per group in R. For scores per cell use `sc-pathway-scoring`; for programmes discovered without gene sets use `sc-gene-programs`.
Start a step with `python skills/_sdk/notebook/run.py new enrichment`. Load `enrichment = load_skill("sc-enrichment")`, then call `rank_groups`, `load_gene_sets` (GMT, JSON or Enrichr library), and `ora` or `gsea`. Pass the complete tested gene universe as `background` for ORA; its API default is all genes in the supplied ranking. Write returned tables and Figures with `write_output`. See `examples/example_step.py`.
The default engine is Python. Explicit `engine="auto"` prefers R when its packages are available; `engine="r"` requires clusterProfiler. The legacy `gsea_r` method uses GO_BP/KEGG/Reactome annotation databases, not custom GMT. `gsva` accepts a gene-set mapping, or None for the GO_BP/KEGG R database route.
Rankings need gene/names and a score or effect, with an optional group column. `rank_groups` reads log-normalised `X`, never `raw`. For the processed PBMC demo, use `.raw.to_adata()` in new steps; the CLI retains its old scaled-X demo ranking for compatibility. The CLI accepts H5AD or an upstream output directory containing `processed.h5ad` and marker/DE tables.
ORA/GSEA CLI writes `processed.h5ad`, `report.md`, `result.json`, `reproducibility/`, and five tables: `enrichment_results.csv`, `enrichment_significant.csv`, `group_summary.csv`, `ranking_input.csv`, `top_terms.csv`. Python GSEA adds `tables/gsea_running_scores.csv` when running curves can be built. `figure_data/` mirrors plot tables. Figures depend on available terms. GSVA uses `tables/gsva_r_scores.csv` and `figures/gsva_r_heatmap.png` instead. See `references/output_contract.md` for R-specific files.
The default is now `python`; ask for `--engine auto` to retain auto-selection.
`engine`, with the reason in `result.json.summary.warnings`. This is not interchangeable with gseapy's permutation implementation.
filter. `--fdr-threshold` controls `group_summary.csv` and the report summary.
invalid log-fold changes; use a log-normalised snapshot instead.
error; the R scripts no longer manufacture pathways to fill an empty result.
alias. For Hallmark, explicitly load gene sets and pass the mapping to `gsva`.
python skills/singlecell/scrna/sc-enrichment/sc_enrichment.py --demo --output /tmp/sc_enrich_demo python skills/singlecell/scrna/sc-enrichment/sc_enrichment.py --input clustered.h5ad --output results/ora --gene-set-db hallmark --groupby cell_type python skills/singlecell/scrna/sc-enrichment/sc_enrichment.py --input clustered.h5ad --output results/gsea --method gsea --gene-sets pathways.gmt --gsea-seed 123 python skills/singlecell/scrna/sc-enrichment/sc_enrichment.py --input clustered.h5ad --output results/gsva --method gsva_r --groupby cell_type --gene-sets pathways.gmt
<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
Rank each group's genes against the rest using log-normalised ``X``.
``method`` is wilcoxon (default), t-test or logreg. This uses ``X``, not ``raw``; convert a scaled object with ``adata.raw.to_adata()`` first when raw holds log-normalised values. Scanpy ranking statistics remain in ``uns``. Return a table with group, gene and available scores/p-values.
Load GMT/JSON or fetch an Enrichr library; optionally match genes to a universe.
``source`` accepts a local path or hallmark/kegg/reactome/go_bp aliases and full Enrichr library names. Remote sources need network access and gseapy; local files do not. ``species`` is human (default) or mouse. Return a term-to-gene-list mapping; no output files are written.
Return the six named PBMC demo signatures, human by default or mouse symbols.
Convert marker groups to gene sets, sorted by adjusted p-value or score.
``markers`` needs group and names (or gene). ``groups=None`` selects all; ``top_n=None`` keeps all genes. ``universe`` optionally restricts and canonicalises gene symbols. Raise ValueError when no sets remain.
Test over-representation with a local hypergeometric test or clusterProfiler.
``ranking`` accepts marker/DE columns and optional group (default
Conversational & memory-enabled AI research partner for multi-omics analysis. CLI + Desktop App (installers in Releases). From biological idea to full research paper.
Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation. Skip…
Load when discovering bulk gene co-expression modules and hub genes with R WGCNA. Skip direct expression contrasts (use…
Load when comparing gene expression between two conditions in bulk RNA-seq count data. Skip
Load when estimating cell-type proportions in bulk RNA-seq samples from a single-cell or
Load when running pathway / GO term enrichment on a bulk RNA-seq DE result list. Skip when
Load when converting Ensembl, Entrez or symbol IDs in a bulk RNA count matrix using an explicit mapping or a small human demo…