bulkrna-batch-correcti…
Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation. Skip…
Load when classifying perturbed vs non-perturbed cells in a Perturb-seq / CRISPR-screen scRNA
$ npx -y skills add tiangzlab/omicsclaw --skill sc-perturb --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sc-perturbContext preview
The summary Claude sees to decide when to auto-load this skill.
Load when classifying perturbed vs non-perturbed cells in a Perturb-seq / CRISPR-screen scRNA
name: sc-perturb description: Load when classifying perturbed vs non-perturbed cells in a Perturb-seq / CRISPR-screen scRNA AnnData via the pertpy Mixscape workflow. Skip when guide labels are not yet attached to the expression object (use sc-perturb-prep); in-silico KO predictions on unperturbed data (use sc-in-silico-perturbation). tags: - singlecell - scrna - perturbation - perturb-seq - crispr - mixscape - pertpy
Classify observed Perturb-seq cells with pertpy Mixscape. Guide labels and a non-targeting control group must already exist; otherwise use `sc-perturb-prep`. This is not an in-silico knockout predictor.
python skills/singlecell/scrna/sc-perturb/sc_perturb.py --demo --seed 0 --output /tmp/sc_perturb_demo python skills/singlecell/scrna/sc-perturb/sc_perturb.py --input prepared.h5ad --pert-key perturbation --control NT --split-by replicate --seed 0 --output results/perturb
`mixscape` (`--method mixscape`) is the only method. Tune `--n-neighbors`, `--logfc-threshold`, `--pval-cutoff` and `--perturbation-type KO|OE` explicitly.
Upstream: `sc-perturb-prep`, or an AnnData with verified screen labels. Validate labels, supply/compute PCA, build perturbation signatures, then classify cells. Both pertpy stages receive `--seed` (API `random_state`, default 0). Downstream: `sc-de` or `sc-enrichment` after reviewing target-level calls.
Uses normalized expression. Count-like X is saved in `layers['counts']` and log-normalized. Existing `X_pca` is reused; otherwise PCA is computed before the legacy normalization step. Prefer an upstream PCA on appropriate normalized features for real screens. The API leaves its input unchanged.
Input: `.h5ad` with a perturbation column, control label and optional split key. The CLI writes `processed.h5ad`, `report.md`, `result.json`, `reproducibility/commands.sh`, `tables/mixscape_cell_classes.csv`, `tables/mixscape_class_counts.csv`, `tables/mixscape_global_class_counts.csv` and `figures/mixscape_global_classes.png`. Plot data and their manifest are in `figure_data/`; R-enhanced figures are optional.
<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
Return an AnnData copy with Mixscape classes and posterior probabilities.
Uses normalized expression, preserving count-like X in layers['counts'] before log-normalization. split_by=None selects nearest-neighbour controls. Both pertpy stages receive random_state; a missing control or split column raises ValueError. Requires pertpy (validated with 1.0.3 and sklearn 1.7.2).
Return method, seed and output columns; keep=False removes the run record.
Return class and n_cells columns for target-specific Mixscape labels.
Return global_class and n_cells columns for control, KO/OE and NP cells.
Return a Figure of global Mixscape cell counts without saving files.
<!-- api:end -->
`anndata`, `matplotlib`, `numpy`, `pandas`, `pertpy`, `scanpy`, `scipy`, `scikit-learn`, `filelock`
The Python 3.11 CPU example is verified with `pertpy==1.0.3`, `scikit-learn==1.7.2`, `anndata==0.11.4`, `statsmodels==0.14.6` and `filelock==4.0.12`. statsmodels 0.15 removed a private import used by this pertpy release. It also needs filelock at import time but omits it from dependency metadata. Its dependencies include JAX; use the separate extended environment. blitzgsea may need pip's isolated source build, which the production wheels-only installer does not perform.
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…