bulkrna-batch-correcti…
Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation. Skip…
Load when predicting in-silico gene knockout effects on a normalised scRNA AnnData via GRN-based
$ npx -y skills add tiangzlab/omicsclaw --skill sc-in-silico-perturbation --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sc-in-silico-perturbationContext preview
The summary Claude sees to decide when to auto-load this skill.
Load when predicting in-silico gene knockout effects on a normalised scRNA AnnData via GRN-based
name: sc-in-silico-perturbation description: Load when predicting in-silico gene knockout effects on a normalised scRNA AnnData via GRN-based propagation (Python) or scTenifoldKnk (R). Skip when you have a real Perturb-seq / CRISPR screen (use sc-perturb); predicting drug sensitivity (use sc-drug-response). tags: - singlecell - scrna - in-silico-perturbation - knockout - grn - sctenifoldknk
Explore descriptive gene associations or run the optional scTenifoldKnk R method. The default `grn_ko` name is retained for CLI compatibility; its Pearson edge-removal score is not a causal knockout simulation or a significance test.
| Method | What it returns | Requirement | |---|---|---| | `grn_ko` | Absolute correlation edge-removal scores; no p-values | Python science stack | | `sctenifoldknk` | R scTenifoldKnk differential-regulation table | Rscript + scTenifoldKnk |
python skills/singlecell/scrna/sc-in-silico-perturbation/sc_in_silico_perturbation.py --demo --output /tmp/sc_iko_demo python skills/singlecell/scrna/sc-in-silico-perturbation/sc_in_silico_perturbation.py --input expression.h5ad --ko-gene TP53 --n-top-genes 2000 --output results/associations python skills/singlecell/scrna/sc-in-silico-perturbation/sc_in_silico_perturbation.py --input expression.h5ad --method sctenifoldknk --ko-gene TP53 --seed 0 --n-cores 1 --output results/tenifold
`--corr-threshold` is an inactive legacy argument; it never thresholded the correlation matrix. The API intentionally does not expose it.
Preflight checks the target gene. `grn_ko` selects high-variance genes plus the target, computes Pearson correlations, zeros the target row/column and averages absolute changes by gene. The target's own score summarizes all its removed edges; other genes lose one edge. R uses the existing temporary CSV bridge and sets `set.seed` before fitting. No backend is silently substituted.
Reads raw_counts from `layers['counts']` when present, otherwise X. Inputs are unchanged by the API; returned table metadata records the chosen source. CLI `processed.h5ad` carries `omicsclaw_input_contract` and `omicsclaw_matrix_contract`. Use `sc-perturb` for an actual perturbation screen.
Input: expression `.h5ad` with `--ko-gene` in `var_names`. The CLI writes `processed.h5ad`, `tables/diff_regulation.csv`, `report.md`, `result.json`, `figures/top_perturbed_genes.png`, and figure/plot-data manifests. The default table has `gene`, `dr_score`, `wt_ko_corr`; only `perturbation_dr_score` is added to `var`. R additionally writes `tables/tenifold_diff_regulation.csv` and may produce a p-value histogram and statistical `var` columns. R-enhanced volcano plots require R statistical output; they are not made for correlation scores.
<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
Return descriptive edge-removal scores, not a causal knockout simulation.
Select the most variable genes plus ko_gene, compute Pearson correlations from layers['counts'] (or X), and average absolute changes after zeroing the target row and column. Returns gene, dr_score and wt_ko_corr, with no p-values. The target's own score includes all its removed edges and is not comparable to another gene's single removed edge. The input AnnData is unchanged.
Return scTenifoldKnk diffRegulation through a temporary CSV bridge.
Uses layers['counts'] or X without changing the input. Requires Rscript and the scTenifoldKnk R package; missing packages and R failures propagate. random_state is passed to R set.seed before fitting the network.
Return method and interpretation; keep=False removes the table's run record.
Return top correlation scores, or lowest adjusted p-values for scTenifoldKnk.
Return a Figure of descriptive edge scores or R differential-regulation FC.
<!-- api:end -->
`anndata`, `matplotlib`, `numpy`, `pandas`, `scanpy`, `scipy`
The R method additionally requires the scTenifoldKnk R package.
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…