spatial-raw-processing
БесплатноБез исполняемых скриптовНе проверенLoad when converting spatial transcriptomics raw FASTQ pairs through ST-Pipeline into a `raw_counts.h5ad` ready for spatial-preprocess. Skip when input is…
от mdbabumiamssm★ 36 звёзд на GitHubОб этом скилле
spatial-raw-processing
When to use
The user has paired-end spatial-transcriptomics FASTQ files (read1 =
spatial barcode + UMI, read2 = cDNA) plus a STAR genome index, and
wants the standard ST-Pipeline run that produces a raw_counts.h5ad
with one row per spatial spot. Single backend: st_pipeline (calls
run_stpipeline from skills/spatial/_lib/stpipeline_adapter.py).
After this skill, chain to spatial-preprocess for QC + normalisation.
For non-spatial scRNA FASTQ use sc-fastq-qc. For bulk RNA-seq read
QC use bulkrna-read-qc.
Inputs & Outputs
| Input | Format | Required |
|---|---|---|
| Read 1 (barcode + UMI) | .fastq / .fastq.gz (--read1) |
yes (real run) |
| Read 2 (cDNA) | .fastq / .fastq.gz (--read2) |
yes (real run) |
| Spot barcode IDs | TSV / file (--ids) |
yes (real run) |
| STAR index | directory (--ref-map) |
yes (real run) |
| Reference annotation | GTF (--ref-annotation) |
optional |
| Bundle JSON / YAML | path (positional --input) |
optional — alternative to flag-by-flag args |
| Output | Path | Notes |
|---|---|---|
| Raw counts AnnData | raw_counts.h5ad |
one row per spatial spot; obs["barcode"], obsm["spatial"], obs["x_array"] / y_array if available |
| Pipeline metrics | upstream-tool outputs (logs, stats) | written by ST-Pipeline alongside raw_counts.h5ad |
| Report | result.json |
always |
Flow
- Parse args (or load bundle JSON / YAML from positional
--input). _apply_effective_defaultsfills missing parameter values (threads, trimming, UMI ranges, etc.)._validate_real_run_bundle: checkread1/read2/ids/ref-mapexist and are well-typed; reject duplicate read1=read2; verify FASTQ extension.- Call
run_stpipeline(...)which shells out to ST-Pipeline (requires thestpipelinebinary on PATH or--stpipeline-repo+--bin-path). - Wrap the resulting count matrix into AnnData with
X = raw_counts,layers["counts"],raw = raw_counts_snapshot. - Save
raw_counts.h5adandresult.json. Print "next: spatial-preprocess on raw_counts.h5ad".
Gotchas
- All input failures raise typed exceptions wrapped in
SystemExit(1).spatial_raw_processing.py:353catchesDataError/DependencyError/ParameterError/ProcessingErrorand re-raises asSystemExit(1). The originating raises live in_validate_real_run_bundle—:125raisesParameterError(f"Missing required parameter: {key}")for missingread1/read2/ids;:128raisesDataError(...)for non-existent files;:131raisesDataError("Resolved read1/read2 inputs must be FASTQ files.")for non-FASTQ extensions;:134raisesParameterErrorfor read1==read2;:138-141raisesDataErrorfor missing / wrong-type STAR index dir;:145-146raisesDataErroronly when--ref-annotationwas provided but the path is missing or not a file (the param itself is optional — omitting it doesn't raise). --read1/--read2/--ids/--ref-mapare all required for real runs (not enforced by argparserequired=True, validated later). Missing any →ParameterError. Demo mode skips this validation entirely.- The output filename is always
raw_counts.h5ad(spatial_raw_processing.py:286). It's not configurable — the contract is consumed byspatial-preprocess. Multiple runs to the same--outputwill overwrite. - No tables / figures are written. This skill is a wrapper around an external pipeline; it produces only the AnnData + the upstream tool's logs.
result.jsonrecords the run params, not analysis stats. - Demo mode skips ST-Pipeline entirely.
spatial_raw_processing.py:235callscreate_demo_upstream_outputs(...)to fabricate a syntheticraw_counts.h5ad. Useful for plumbing checks; does NOT exercise the FASTQ → matrix code path. --platformis a metadata label only.:201documents it as "Label recorded in outputs"; ST-Pipeline doesn't branch on it. Common values:visium,visium_hd,slideseq, custom strings.
Key CLI
# Demo (synthetic raw_counts.h5ad — does NOT run ST-Pipeline)
python omicsclaw.py run spatial-raw-processing --demo --output /tmp/spatial_raw_demo
# Real run with explicit args
python omicsclaw.py run spatial-raw-processing \
--read1 sample_R1.fastq.gz --read2 sample_R2.fastq.gz \
--ids barcodes.tsv \
--ref-map /refs/star_index_human \
--ref-annotation /refs/genes.gtf \
--exp-name visium_001 --platform visium \
--threads 16 \
--output results/
# Real run from bundle JSON
python omicsclaw.py run spatial-raw-processing \
--input run_bundle.json --output results/
# Slide-seq with custom UMI range
python omicsclaw.py run spatial-raw-processing \
--read1 R1.fq.gz --read2 R2.fq.gz --ids barcodes.tsv \
--ref-map /refs/star_index --platform slideseq \
--umi-start-position 1 --umi-end-position 8 \
--output results/
See also
references/parameters.md— every CLI flag, ST-Pipeline option mapping- `references/methodolo
Установить spatial-raw-processing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл spatial-raw-processing?
Load when converting spatial transcriptomics raw FASTQ pairs through ST-Pipeline into a `raw_counts.h5ad` ready for spatial-preprocess. Skip when input is already a count-matrix AnnData (go straight to spatial-preprocess) or for non-spatial bulk / scRNA FASTQ (use bulkrna-read-qc / sc-fastq-qc).
Как установить скилл spatial-raw-processing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл spatial-raw-processing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub