bulkrna-batch-correcti…
Load when correcting batch effects in bulk expression using R sva ComBat or the legacy Python parametric approximation. Skip…
Load when merging multiple single-sample scRNA-seq count matrices (one per sample-from-sc-count)
$ npx -y skills add tiangzlab/omicsclaw --skill sc-multi-count --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/sc-multi-countContext preview
The summary Claude sees to decide when to auto-load this skill.
Load when merging multiple single-sample scRNA-seq count matrices (one per sample-from-sc-count)
name: sc-multi-count description: Load when merging multiple single-sample scRNA-seq count matrices (one per sample-from-sc-count) into a single downstream-ready AnnData with sample labels. Skip when input is one already-merged AnnData (use sc-standardize-input); FASTQ→counts on each sample (use sc-count). trigger: merge count matrices, multi-sample count, aggregate samples, combine count outputs, cellranger aggr alternative tags: - singlecell - scrna - multi-sample - merge - aggregation
from skills._sdk.notebook import load_skill, read_input, write_output
merge = load_skill("sc-multi-count")
samples = [read_input("data/sample_a.h5ad"), read_input("data/sample_b.h5ad")]
adata = merge.merge_samples(samples, sample_ids=["sample_a", "sample_b"])
write_output(adata, "intermediate/merged.h5ad")
write_output(merge.per_sample_summary(adata), "tables/samples.csv")The API returns objects and does not write files. Existing sample labels are kept even when `sample_ids` supplies different barcode prefixes. See `examples/example_step.py` for a count-conservation check using two halves of PBMC3k; those halves are demonstration samples, not biological replicates.
The user has run `sc-count` (or another counting backend) on multiple samples separately and now needs them merged into one AnnData with a canonical sample-label column for downstream batch-aware analysis. This only joins matrices; it does not perform Cell Ranger's depth normalization or recount reads.
**Inputs**
takes repeated `--input` H5AD paths. Features are aligned by name.
**Outputs**
1. Collect per-sample AnnData paths from each `--input <path>` flag (`action="append"`); paired `--sample-id <id>` flags assign sample labels. 2. Load and tag samples, preserving an existing `obs["sample_id"]`. 3. Join features and cells, zero-fill absent features, then record the count contract. 4. Write merged AnnData; emit per-sample / per-barcode summary tables. 5. Render barcode-rank + composition figures. 6. Emit `report.md` + `result.json`.
# Demo (two halves of PBMC3k raw counts) python skills/singlecell/scrna/sc-multi-count/sc_multi_count.py --demo --output /tmp/sc_multi_demo # Three samples — repeat --input per file python skills/singlecell/scrna/sc-multi-count/sc_multi_count.py \ --input s1.h5ad --input s2.h5ad --input s3.h5ad \ --output results/ # With explicit per-sample labels (paired with --input order) python skills/singlecell/scrna/sc-multi-count/sc_multi_count.py \ --input s1.h5ad --sample-id ctrl_a \ --input s2.h5ad --sample-id ctrl_b \ --input s3.h5ad --sample-id treat_a \ --output results/
<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->
Merge .X counts, align features and return a standardized copy.
Inputs are not modified. Missing features in an outer join become zeros. Existing sample labels are kept; sample_ids supplies missing labels and, when given, prefixes each input's barcodes. With no IDs, existing barcodes are kept and duplicate names get numeric suffixes; missing sample labels become sample_1, sample_2, etc. Like the CLI, this does not test whether .X holds integer counts. Standardize external inputs before merging them.
Return per-barcode .X counts and detected features, sorted by total counts.
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…