bulkrna-batch-correcti…
Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation. Skip…
Load when attaching cell-barcode → sgRNA assignments from a mapping TSV/CSV onto a Perturb-seq
$ npx -y skills add tiangzlab/omicsclaw --skill sc-perturb-prep --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sc-perturb-prepContext preview
The summary Claude sees to decide when to auto-load this skill.
Load when attaching cell-barcode → sgRNA assignments from a mapping TSV/CSV onto a Perturb-seq
name: sc-perturb-prep description: Load when attaching cell-barcode → sgRNA assignments from a mapping TSV/CSV onto a Perturb-seq expression AnnData, producing standardised perturbation / sgRNA / target-gene obs columns. Skip when the AnnData already has perturbation labels (use sc-perturb); raw guide-calling from FASTQ (use upstream demuxlet / cellranger guide pipelines). tags: - singlecell - scrna - perturb-prep - perturb-seq - crispr - sgrna-assignment
Attach an upstream barcode-to-guide table to expression data. This is the `mapping_tsv` method, not a FASTQ guide caller. It needs no pertpy installation.
python skills/singlecell/scrna/sc-perturb-prep/sc_perturb_prep.py --demo --output /tmp/sc_perturb_prep_demo python skills/singlecell/scrna/sc-perturb-prep/sc_perturb_prep.py --input expression.h5ad --mapping-file mapping.tsv --output results/prep
Mapping columns are inferred from common names, or selected with `--barcode-column`, `--sgrna-column`, and `--target-column`. Without target values, `--delimiter _ --gene-position 0` extracts the target from a guide ID. Pass `--keep-multi-guide` only when retaining multi-guide cells is intended.
Upstream: expression counts and guide calls from the same cells. Standardize mapping columns, collapse guides per barcode, match assigned cells, retain gene-expression features and canonicalize the matrix. Downstream: use `sc-perturb` for observed perturbation signatures, or `sc-preprocessing` for clustering. The API returns objects; the example step writes them explicitly.
Raw counts are preferred; canonicalization can recover counts from a layer or raw snapshot. Inspect `omicsclaw_matrix_contract` and `run_info` for the actual expression source. A normalized matrix is not evidence of raw counts.
Input: `.h5ad`, 10x H5 or a matrix directory, plus mapping TSV/CSV for real runs. The CLI writes `processed.h5ad`, `report.md`, `result.json`, `reproducibility/commands.sh`, `tables/perturbation_assignments.csv`, `tables/assignment_status_counts.csv`, `tables/perturbation_counts.csv`, `tables/feature_type_summary.csv` and `figures/perturbation_counts.png`. `tables/dropped_multi_guide_cells.csv` is written only when rows were dropped. Plot data are also written under `figure_data/`.
<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
Return barcode, sgRNA and target_gene columns from a pandas table.
Column names may be supplied explicitly. Missing target genes are inferred later from guide names; duplicate rows and empty barcode/guide rows are removed.
Return (assigned, dropped) tables with one row per barcode.
Controls match whole tokens, not substrings of gene names. Multiple guides are dropped by default; retained multi-guide cells keep their status.
Return a gene-expression AnnData with assignments on matching cells.
The input is unchanged. Gene features and the expression matrix are canonicalized using the single-cell input contract; no pertpy is needed.
Return preparation provenance; keep=False removes the run record.
Return assignment_status and n_cells columns for the retained cells.
Return perturbation and n_cells columns, ordered by decreasing cell count.
Return a Figure of cell counts for up to n_top perturbations; save it separately.
<!-- api:end -->
`anndata`, `matplotlib`, `numpy`, `pandas`, `scanpy`, `scipy`
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…