bulkrna-batch-correcti…
Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation. Skip…
Load when preprocessing a single-cell ATAC peak × cell AnnData via Signac-style TF-IDF +
$ npx -y skills add tiangzlab/omicsclaw --skill scatac-preprocessing --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/scatac-preprocessingContext preview
The summary Claude sees to decide when to auto-load this skill.
Load when preprocessing a single-cell ATAC peak × cell AnnData via Signac-style TF-IDF +
name: scatac-preprocessing description: Load when preprocessing a single-cell ATAC peak × cell AnnData via Signac-style TF-IDF + LSI + Leiden, producing a clustered UMAP-ready object. Skip when input is fragments; BAM (peak calling not implemented here); scRNA preprocessing (use sc-preprocessing). trigger: scATAC preprocessing, single-cell ATAC preprocessing, ATAC TF-IDF LSI, chromatin accessibility clustering, scATAC UMAP Leiden tags: - singlecell - scatac - atac - preprocessing - tfidf - lsi - clustering - leiden
from skills._sdk.notebook import load_skill, read_input, write_output
atac = load_skill("scatac-preprocessing")
adata = read_input("data/peaks.h5", reader=atac.read_10x_peaks)
adata = atac.preprocess(adata, random_state=0)
write_output(adata, "intermediate/accessibility.h5ad")
write_output(atac.cluster_summary(adata), "tables/clusters.csv")For H5AD use `read_input` without a reader. The API returns a copy and does not write files. `examples/example_step.py` recovers three planted groups from `load_demo("atac_synthetic")`; that tests computation, not biological validity.
The user has a cell × peak scATAC AnnData (raw-count-like accessibility matrix in `.X`) and wants the standard "filter → TF-IDF → LSI → graph → UMAP → Leiden" pipeline in one shot. Currently a single backend: `tfidf_lsi` (Signac-style). The skill stops at clustered UMAP — no fragment QC, no peak calling, no motif / gene-activity scoring, no multi-sample integration. For scRNA preprocessing use `sc-preprocessing`.
**Inputs**
**Outputs**
1. Read cell × peak counts. The 10x reader uses `gex_only=False` and keeps Peaks in multiome inputs; other CLI formats use `smart_load`. 2. Validate `.X` is present, non-empty, non-negative. 3. Compute per-cell `n_peaks_by_counts` / `total_counts`; filter cells by `--min-peaks` and peaks by `--min-cells`. 4. Retain the globally most accessible peaks up to `--n-top-peaks`. 5. Run Signac-style TF-IDF (`--tfidf-scale-factor`); truncated-SVD LSI to `--n-lsi` components. 6. Build neighbour graph (`--n-neighbors`), UMAP, Leiden (`--leiden-resolution`). 7. Save `processed.h5ad`, tables, figures, `report.md`, `result.json`.
# Demo (built-in synthetic scATAC) python skills/singlecell/scatac/scatac-preprocessing/scatac_preprocessing.py --demo --output /tmp/scatac_demo # Standard run on a 10x scATAC h5 python skills/singlecell/scatac/scatac-preprocessing/scatac_preprocessing.py \ --input atac_peaks.h5 --output results/ # Tune QC + feature budget python skills/singlecell/scatac/scatac-preprocessing/scatac_preprocessing.py \ --input atac_peaks.h5ad --output results/ \ --min-peaks 300 --min-cells 10 --n-top-peaks 20000 # Tune latent space + clustering python skills/singlecell/scatac/scatac-preprocessing/scatac_preprocessing.py \ --input atac_peaks.h5ad --output results/ \ --n-lsi 40 --n-neighbors 20 --leiden-resolution 1.0
<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
Return a filtered copy of .X accessibility counts with TF-IDF, LSI and Leiden.
Cells need min_peaks detected peaks; peaks need min_cells cells. Keep at most n_top_peaks, ranked by total counts. Counts remain in layers['counts'] and .raw on retained peaks; .X becomes log1p TF-IDF. LSI uses scaled SVD components, excluding the first component from the neighbor graph. UMAP and Leiden use that graph. A
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…