bulkrna-batch-correcti…
Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation. Skip…
Load when inferring TF → target gene regulatory networks on a normalised scRNA AnnData via
$ npx -y skills add tiangzlab/omicsclaw --skill sc-grn --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sc-grnContext preview
The summary Claude sees to decide when to auto-load this skill.
Load when inferring TF → target gene regulatory networks on a normalised scRNA AnnData via
name: sc-grn description: Load when inferring TF → target gene regulatory networks on a normalised scRNA AnnData via pySCENIC (GRNBoost2 + cisTarget + AUCell) or correlation-based GRN fallback (when arboreto is unavailable, in --demo, or with --allow-simplified-grn). Skip when computing ligand-receptor cell-cell signalling (use sc-cell-communication); predicting genetic-KO effects (use sc-in-silico-perturbation). trigger: grn, gene regulatory, scenic, pyscenic, regulon, transcription factor, grnboost tags: - singlecell - scrna - grn - gene-regulatory-network - scenic - pyscenic - grnboost2 - aucell - cistarget
grn = load_skill("sc-grn")
adata = read_input("expression.h5ad")
edges = grn.infer_adjacencies(adata, tfs=["SPI1", "IRF8", "STAT1"],
method="correlation", n_top=50)
regulons = grn.regulons_from_adjacencies(edges)
scores = grn.score_regulons(adata, regulons, method="mean")
write_output(edges, "tables/adjacencies.csv")
write_output(scores, "tables/mean_target_expression.csv")Functions do not annotate the input automatically. The PBMC example in `examples/example_step.py` uses caller-supplied TFs and explicitly labeled mean-expression scores.
<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
Return TF, target and importance columns using the caller's TF list.
grnboost2 retains the CLI's fallback to absolute Spearman correlation when its backend fails or returns no edges. Correlation excludes supplied TFs from candidate targets and keeps n_top targets per TF. No motif validation occurs here; a warning and run_info report any fallback.
:param tfs: TF names; only names present in the selected matrix are used. :param method: grnboost2 (default) or correlation. :param layer: Explicit expression layer; None prefers counts, aligned raw, then X. :param random_state: GRNBoost2 seed, default 42. Correlation is deterministic. :param n_top: Correlation targets per TF, default 50. :param n_jobs: GRNBoost2 workers, default 4. :returns: A new DataFrame; input AnnData is not modified. :raises ValueError: The method or budget is invalid, or no TF overlaps.
Return an independent backend/fallback record; keep=False removes it from attrs.
Return motif-pruned regulon dictionaries using the existing cisTarget bridge.
Requires pySCENIC and caller-provided databases and motif annotations. Thresholds retain the CLI defaults: rank 5000, AUC 0.05, NES 3 and 50 targets. Backend and resource errors propagate; no data are downloaded.
Group the strongest edges per TF without motif validation; default 50 targets.
Return per-cell regulon scores without annotating the input.
aucell requires pySCENIC and ranks count-layer/aligned-raw/X expression. mean averages each regulon's targets in X, matching the old simplified CLI. It is not AUCell, an enrichment statistic, or motif validation.
:param method: aucell (default) or mean; no automatic scoring fallback. :param random_state: AUCell seed, default 42; mean is deterministic. :param n_jobs: AUCell workers, default 4. :returns: DataFrame indexed by cell; attrs names the scoring_method and is_aucell. :raises ValueError: The scoring method is unknown. :raises ImportError: AUCell's optional backend is unavailable.
Return a score heatmap, optionally averaged over aligned cell groups.
<!-- api:end -->
`infer_adjacencies` defaults to GRNBoost2, with `random_state=42` and `n_jobs=4`. Its legacy fallback is absolute Spearman correlation, retaining `n_top=50` targets per TF. `run_info(edges)` records the actual method and fallback reason, also emitted as a warning. `method="correlation"` runs directly without arboreto.
The simplified path now respects the caller's TF list. Correlation gives co-expression candidates, not validated regulatory edges. `regulons_from_adjacencies` only groups these candidates; `prune_regulons` needs pySCENIC, caller-provided cisTarget databases and motif annotations. It retains rank threshold 5000, AUC threshold 0.05 and NES threshold 3; it does not download resources.
`score_regulons(method="aucell")` requires pySCENIC and uses seed 42. `method="mean"` averages target expression in X, matching the old simplified CLI. Mean expression is not AUCell and has no enrichment p-value.
Mean scoring uses X; verify its normalization separately (`_api.py:15`, `_api.py:98`).
Save the diagnostics separately when exporting edges (`_api.py:61`).
The full pySCENIC path also needs external resources and was not validated merely by running the correlation example (`_api.py:68`).
for compatibility even for mean scores. Check `result.json["data"]["scoring_method"]`.
No TF overlap raises an error in the API (`_api.py:15`).
The API returns adjacency tables, regul
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…