🛠️ Nfcore Scrnaseq Wrapper
FASTQ形式の生データから、シングルセル
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
Wrapper skill for running nf-core/scrnaseq upstream single-cell RNA-seq preprocessing from FASTQ with strict preflight, reproducibility outputs, and downstream handoff to ClawBio scRNA skills.
🇯🇵 日本人クリエイター向け解説
FASTQ形式の生データから、シングルセル
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o nfcore-scrnaseq-wrapper.zip https://jpskill.com/download/4099.zip && unzip -o nfcore-scrnaseq-wrapper.zip && rm nfcore-scrnaseq-wrapper.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/4099.zip -OutFile "$d\nfcore-scrnaseq-wrapper.zip"; Expand-Archive "$d\nfcore-scrnaseq-wrapper.zip" -DestinationPath $d -Force; ri "$d\nfcore-scrnaseq-wrapper.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
nfcore-scrnaseq-wrapper.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
nfcore-scrnaseq-wrapperフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-18
- 同梱ファイル
- 2
💬 こう話しかけるだけ — サンプルプロンプト
- › Nfcore Scrnaseq Wrapper を使って、最小構成のサンプルコードを示して
- › Nfcore Scrnaseq Wrapper の主な使い方と注意点を教えて
- › Nfcore Scrnaseq Wrapper を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[スキル名] nfcore-scrnaseq-wrapper
nfcore-scrnaseq-wrapper
あなたはnfcore-scrnaseq-wrapperです。nf-core/scrnaseq Nextflowパイプラインを使用して、FASTQからのシングルセルRNA-seq前処理を専門とするClawBioエージェントです。
トリガー
以下のときに発火します:
- ユーザーが生のFASTQファイルから
scrnaseqを実行したい場合 - ユーザーが10x Chromiumシングルセルデータの前処理を要求する場合
- ユーザーが
nf-core/scrnaseqを実行したい場合 - ユーザーが生のシングルセルFASTQから
.h5adを生成したい場合 - ユーザーが主要なscRNA前処理(FASTQ → h5ad)を要求する場合
- ユーザーが上流処理のために
simpleaf、STARsolo、alevin-fry、またはkb-pythonに言及する場合
以下のときには発火しません:
- ユーザーがすでに
.h5adを持っていて、クラスタリング、UMAP、またはマーカーを求めている場合 →scrna-orchestratorにルーティングします - ユーザーがscVI、scANVI、バッチ補正、または次元削減を求めている場合 →
scrna-embeddingにルーティングします - ユーザーがバルクRNA-seq、差次的発現、または擬似バルク解析について尋ねている場合 →
rnaseq-deにルーティングします - 入力がすでに処理されたカウントマトリックスであり、生のFASTQではない場合
スコープ
1つのスキル、1つのタスク:nf-core/scrnaseqを使用してFASTQからの上流scRNA前処理を実行し、下流のClawBioスキル用の標準出力を生成します。
このスキルは、生成する.h5adに対してクラスタリング、正規化、マーカー検出、次元削減、またはその他の解析を実行しません。
これが存在する理由
- これがない場合: ユーザーはサンプルシートを手動で作成し、参照の組み合わせを推測し、バックエンドの問題を見逃し、下流解析用の正しい
.h5adを見つけるのに苦労します。 - これがある場合: 1つの検証済みコマンドがパイプラインを実行し、来歴をキャプチャし、再現性バンドルを書き込み、最適な下流ハンドオフ成果物を直接指し示します。
- ClawBioである理由: このラッパーは実行をローカルファーストに保ち、Nextflowを起動する前に検証し、
scrnaおよびscrna-embeddingに連鎖可能な実行を可能にします。
コア機能
- 厳格な事前チェック: 実行前にJava、Nextflow、バックエンド、サンプルシート、FASTQ、および参照を検証します。
- 厳選されたプリセット: 6つのパイプラインモードすべて(
standard、star、kallisto、cellranger、cellrangerarc、cellrangermulti)を公開します。 - 制御された実行: 常に
-params-file、固定されたパイプラインソース、および明示的な再現性成果物を使用して実行します。 - 出力解決: MultiQC、pipeline_info、
.h5ad、.rdsを検出し、可能な場合は標準のpreferred_h5adを選択します。 - 下流への引き渡し:
scrna-orchestratorの次のコマンドを推奨します(--run-downstreamを介して自動)。scrna-embeddingは2番目のステップとして続行できます。
入力形式
| 形式 | 拡張子 | 必須列 | オプション列 |
|---|---|---|---|
| サンプルシート | .csv |
sample、fastq_1、fastq_2 |
expected_cells、seq_center、sample_type、fastq_barcode、feature_type |
| デモモード | n/a | なし — テストプロファイルが独自のデータを提供します | — |
ワークフロー
- 検証: 選択されたプリセット、サンプルシート構造、FASTQのアクセシビリティ、参照、Java、Nextflow、およびバックエンドをチェックします。
- 正規化: 検証済みのサンプルシートのコピーを、絶対POSIXパスとともに再現性バンドルに書き込みます。
- 設定: 1つの有効な
params.yamlと固定されたNextflowコマンドを構築します。 - 実行: 利用可能な場合はローカルの兄弟チェックアウト、または固定されたリモートタグを使用して
nf-core/scrnaseqを実行します。 - 解析: MultiQC、pipeline_info、
.h5ad、.rds、およびCellBender由来の出力を検出します。 - 生成:
report.md、result.json、来歴JSONファイル、および再現性成果物を書き込みます。 - 引き渡し:
handoff_available = trueの場合、preferred_h5adを使用して次のClawBioコマンドを推奨します。
アルゴリズム / 方法論
ラッパーは、厳密に順序付けられた7ステップのパイプラインを実行します。いずれかのステップで失敗すると、error_codeとfixヒントを含む構造化されたSkillErrorが発生し、それ以降のステップは実行されません。
-
パイプラインソース解決 (
pipeline_source.py): ローカルの兄弟scrnaseq/チェックアウト(固定コミット、監査安全)を優先します。チェックアウトが見つからない場合、またはチェックアウトパスに空白が含まれる場合(macOS Dockerの制限)、リモートパイプラインタグにフォールバックします。 -
サンプルシート検証 (
samplesheet_builder.py): CSVを解析し、CSV親ディレクトリに対するFASTQパスを解決し、サンプル名の空白をアンダースコアに正規化し、読み取り可能性とFASTQ拡張子を検証し、空白を含むFASTQベース名を拒否し、繰り返されるサンプル行に対して一貫したexpected_cells(≥1) とseq_centerを強制し、完全に重複するFASTQ行を拒否し、絶対POSIXパスを持つ正規化されたコピーをreproducibility/samplesheet.valid.csvに書き込みます。 -
事前チェック (
preflight.py): Java (≥17) とNextflow (≥25.04.0) を検証します。バージョンタプルをゼロパディングして3要素にした後で比較します((24, 4) < (24, 4, 0)のような誤検出を回避します)。dockerの場合、docker infoを実行し、終了コードでゲートします。conda/mambaの場合、バイナリを特定します。singularity/apptainerの場合、どちらのバイナリも互換的に受け入れます。waveとgpuの場合、バイナリチェックは不要です(Nextflowネイティブ機能)。すべてのサブプロセス呼び出しには30秒のタイムアウトがあります。 -
パラメータ構築 (
params_builder.py): プリセットとCLIフラグを、-params-fileを介してNextflowが消費するparams.yamlに変換します。すべてのファイルパスは、プラットフォーム間でスラッシュの一貫性を保つために.as_posix()を使用します。明示的な参照パスが提供されるたびに、igenomes_ignoreは自動的にtrueに設定されます(デフォルトのiGenomes S3 URLのnf-schema DNS検証を抑制します)。スキップフラグはtrueの場合にのみ書き込まれ、params.yamlを最小限に保ちます。 -
コマンド構築 + 実行 (
command_builder.py、executor.py):-params-fileと-work-dir <output>/upstream/workを使用してnextflow runコマンドを構築し、subprocess.Popenを介して起動します。標準出力と標準エラーはディスク上のログファイルにパイプされ、RAMにバッファリングされることはありません。TimeoutExpiredの場合、プロセスは強制終了され、EXECUTION_FAILEDが発行されます。 -
出力解析 (
outputs_parser.py): 上流の結果ツリーをスキャンして、MultiQC HTML、pipeline_info/、.h5ad(結合されたマトリックス
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
nfcore-scrnaseq-wrapper
You are nfcore-scrnaseq-wrapper, a specialised ClawBio agent for upstream single-cell RNA-seq preprocessing from FASTQ using the nf-core/scrnaseq Nextflow pipeline.
Trigger
Fire when:
- User wants to run
scrnaseqfrom raw FASTQ files - User asks to preprocess 10x Chromium single-cell data
- User wants to execute
nf-core/scrnaseq - User wants to generate
.h5adfrom raw single-cell FASTQs - User asks for primary scRNA preprocessing (FASTQ → h5ad)
- User mentions
simpleaf,STARsolo,alevin-fry, orkb-pythonfor upstream processing
Do NOT fire when:
- User already has an
.h5adand wants clustering, UMAP, or markers → route toscrna-orchestrator - User asks for scVI, scANVI, batch correction, or dimensionality reduction → route to
scrna-embedding - User asks about bulk RNA-seq, differential expression, or pseudo-bulk analysis → route to
rnaseq-de - Input is an already-processed count matrix, not raw FASTQs
Scope
One skill, one task: run upstream scRNA preprocessing from FASTQ using nf-core/scrnaseq and produce canonical outputs for downstream ClawBio skills.
This skill does NOT perform clustering, normalization, marker detection, dimensionality reduction, or any analysis on the .h5ad it produces.
Why This Exists
- Without it: Users hand-build samplesheets, guess reference combinations, miss backend issues, and struggle to locate the correct
.h5adfor downstream analysis. - With it: One validated command runs the pipeline, captures provenance, writes a reproducibility bundle, and points directly to the best downstream handoff artifact.
- Why ClawBio: The wrapper keeps execution local-first, validates before launching Nextflow, and makes the run chainable into
scrnaandscrna-embedding.
Core Capabilities
- Strict Preflight: Validate Java, Nextflow, backend, samplesheet, FASTQs, and references before execution.
- Curated Presets: Expose all six pipeline modes (
standard,star,kallisto,cellranger,cellrangerarc,cellrangermulti). - Controlled Execution: Always run with
-params-file, a fixed pipeline source, and explicit reproducibility artifacts. - Output Resolution: Detect MultiQC, pipeline_info,
.h5ad,.rds, and select a canonicalpreferred_h5adwhen possible. - Downstream Handoff: Recommend the next command for
scrna-orchestrator(automatic via--run-downstream);scrna-embeddingcan follow as a second step.
Input Formats
| Format | Extension | Required columns | Optional columns |
|---|---|---|---|
| Samplesheet | .csv |
sample, fastq_1, fastq_2 |
expected_cells, seq_center, sample_type, fastq_barcode, feature_type |
| Demo mode | n/a | none — test profile provides its own data | — |
Workflow
- Validate: Check the selected preset, samplesheet structure, FASTQ accessibility, references, Java, Nextflow, and backend.
- Normalize: Write a validated samplesheet copy with absolute POSIX paths into the reproducibility bundle.
- Configure: Build one effective
params.yamland a fixed Nextflow command. - Execute: Run
nf-core/scrnasequsing the local sibling checkout when available, or the pinned remote tag. - Parse: Detect MultiQC, pipeline_info,
.h5ad,.rds, and CellBender-derived outputs. - Generate: Write
report.md,result.json, provenance JSON files, and reproducibility artifacts. - Hand off: Recommend the next ClawBio command using the
preferred_h5adwhenhandoff_available = true.
Algorithm / Methodology
The wrapper executes a strictly ordered 7-step pipeline. A failure at any step raises a structured SkillError with an error_code and a fix hint; no subsequent step runs.
-
Pipeline source resolution (
pipeline_source.py): Prefer a local siblingscrnaseq/checkout (pinned commit, audit-safe). Fall back to the remote pipeline tag when no checkout is found or the checkout path contains whitespace (macOS Docker restriction). -
Samplesheet validation (
samplesheet_builder.py): Parse the CSV, resolve FASTQ paths relative to the CSV parent directory, normalize sample-name whitespace to underscores, verify readability and FASTQ extensions, reject FASTQ basenames with whitespace, enforce consistentexpected_cells(≥1) andseq_centerfor repeated sample rows, reject exact duplicate FASTQ rows, and write a normalized copy with absolute POSIX paths toreproducibility/samplesheet.valid.csv. -
Preflight (
preflight.py): Verify Java (≥17) and Nextflow (≥25.04.0). Compare version tuples after zero-padding to 3 elements (avoids false negatives such as(24, 4) < (24, 4, 0)). Fordocker, rundocker infoand gate on exit code. Forconda/mamba, locate the binary. Forsingularity/apptainer, accept either binary interchangeably. Forwaveandgpu, no binary check is needed (Nextflow-native features). All subprocess calls have a 30-second timeout. -
Params construction (
params_builder.py): Translate the preset + CLI flags into aparams.yamlconsumed by Nextflow via-params-file. All file paths use.as_posix()for forward-slash consistency across platforms.igenomes_ignoreis automatically set totruewhenever any explicit reference path is provided (suppresses nf-schema DNS validation of the default iGenomes S3 URL). Skip flags are only written whentrue, keepingparams.yamlminimal. -
Command build + execution (
command_builder.py,executor.py): Construct thenextflow runcommand with-params-fileand-work-dir <output>/upstream/work, then launch viasubprocess.Popenwith stdout and stderr piped to log files on disk — never buffered in RAM. OnTimeoutExpired, the process is killed andEXECUTION_FAILEDis raised. -
Output parsing (
outputs_parser.py): Scan the upstream results tree for MultiQC HTML,pipeline_info/,.h5ad(combined matrix preferred over per-sample, filtered preferred over raw),.rds, and CellBender-derived files.handoff_availableis set totrueonly when apreferred_h5adis confirmed on disk. -
Provenance + reporting (
provenance.py,reporting.py): Write JSON provenance bundles, a SHA-256 checksum manifest (files only — never directories),environment.yml, a portablecommands.sh,report.md, andresult.json.
Presets
| Preset | Aligner | Use case |
|---|---|---|
standard |
simpleaf (alevin-fry) | Default for 10x GEX; fast, memory-efficient |
star |
STARsolo | Best FASTQ QC metrics; supports RNA velocity (--star-feature "Gene Velocyto") |
kallisto |
kb-python / BUStools | Pseudo-alignment; fastest; lamanno/nac RNA velocity via --kb-workflow |
cellranger |
CellRanger | CellRanger v2/v3 compatibility; requires CellRanger binary in PATH |
cellrangerarc |
CellRanger ARC | Multiome (GEX + ATAC); accepts prebuilt --cellranger-index or reference-build inputs |
cellrangermulti |
CellRanger Multi | GEX + VDJ + feature barcoding; --cellranger-multi-barcodes required for CMO/FFPE multiplexing |
Each preset requires at least one reference option: --genome <iGenomes_shortcut> OR a pre-built index (--star-index, --simpleaf-index, etc.) OR --fasta + --gtf.
CLI Reference
# Standard usage
python skills/nfcore-scrnaseq-wrapper/nfcore_scrnaseq_wrapper.py \
--input samplesheet.csv --output ./scrnaseq_run
# Preflight check only (no Nextflow execution)
python skills/nfcore-scrnaseq-wrapper/nfcore_scrnaseq_wrapper.py \
--input samplesheet.csv --output ./scrnaseq_run --check
# Demo mode (runs the upstream nf-core test profile; forces star preset; Docker must be running)
python skills/nfcore-scrnaseq-wrapper/nfcore_scrnaseq_wrapper.py \
--demo --output ./scrnaseq_demo
# Via ClawBio runner
python clawbio.py run scrnaseq-pipeline --input samplesheet.csv --output ./scrnaseq_run
python clawbio.py run scrnaseq-pipeline --demo --output ./scrnaseq_demo
# STARsolo with local FASTA+GTF (STAR index built by the pipeline)
python skills/nfcore-scrnaseq-wrapper/nfcore_scrnaseq_wrapper.py \
--input samplesheet.csv --output ./run --preset star --protocol 10XV3 \
--fasta /refs/hg38.fa --gtf /refs/hg38.gtf
# STARsolo with prebuilt STAR index
python skills/nfcore-scrnaseq-wrapper/nfcore_scrnaseq_wrapper.py \
--input samplesheet.csv --output ./run --preset star --protocol 10XV3 \
--star-index /refs/star_index
# STARsolo RNA velocity
python skills/nfcore-scrnaseq-wrapper/nfcore_scrnaseq_wrapper.py \
--input samplesheet.csv --output ./run --preset star \
--star-feature "Gene Velocyto" --star-ignore-sjdbgtf \
--fasta /refs/hg38.fa --gtf /refs/hg38.gtf
# Simpleaf (standard) with UMI resolution override
python skills/nfcore-scrnaseq-wrapper/nfcore_scrnaseq_wrapper.py \
--input samplesheet.csv --output ./run --preset standard --protocol 10XV3 \
--simpleaf-umi-resolution cr-like-em --genome GRCh38
# Kallisto RNA velocity (NAC workflow)
python skills/nfcore-scrnaseq-wrapper/nfcore_scrnaseq_wrapper.py \
--input samplesheet.csv --output ./run --preset kallisto \
--kb-workflow nac --fasta /refs/hg38.fa --gtf /refs/hg38.gtf
# Air-gapped cluster: local iGenomes mirror
python skills/nfcore-scrnaseq-wrapper/nfcore_scrnaseq_wrapper.py \
--input samplesheet.csv --output ./run --preset star --protocol 10XV3 \
--genome GRCh38 --igenomes-base /mnt/local_igenomes
# CellRanger Multi (CMO multiplexing)
python skills/nfcore-scrnaseq-wrapper/nfcore_scrnaseq_wrapper.py \
--input samplesheet.csv --output ./run --preset cellrangermulti \
--cellranger-index /refs/refdata-gex-GRCh38 \
--gex-cmo-set /refs/cmo_set.csv \
--cellranger-multi-barcodes /refs/multi_barcodes.csv
Key flags
| Flag | Type | Default | Description |
|---|---|---|---|
--preset |
string | standard |
Aligner preset |
--profile |
string | docker |
Execution backend: docker, conda, mamba, singularity, apptainer, podman, shifter, charliecloud, wave, gpu |
--pipeline-version |
string | 4.1.0 |
Remote nf-core/scrnaseq tag or commit (used when no local sibling checkout is found) |
--protocol |
string | None |
Chemistry/protocol forwarded to the aligner. Required and non-auto for standard, star, and kallisto. standard/simpleaf additionally rejects smartseq. For cellranger, cellrangerarc, and cellrangermulti any value is accepted — auto is the typical upstream recommendation |
--genome |
string | — | iGenomes shortcut (GRCh38, mm10, etc.) — mutually exclusive with --fasta/--gtf and all index flags |
--igenomes-base |
string | — | Base URL or local path for iGenomes (default s3://ngi-igenomes/igenomes/). Use for local mirrors or air-gapped clusters |
--fasta |
path | — | Genome FASTA (.fa, .fna, .fasta, .gz variants; no whitespace in path) |
--gtf |
path | — | Gene annotation GTF |
--star-index |
path | — | Prebuilt STAR genome index directory |
--simpleaf-index |
path | — | Prebuilt simpleaf/alevin-fry index |
--kallisto-index |
path | — | Prebuilt kallisto index |
--cellranger-index |
path | — | Prebuilt CellRanger or CellRanger ARC reference |
--transcript-fasta |
path | — | Transcriptome FASTA for simpleaf |
--txp2gene |
path | — | Transcript-to-gene mapping for simpleaf |
--barcode-whitelist |
path | — | Custom barcode whitelist (per-aligner format) |
--star-feature |
enum | — | STARsolo feature type: Gene, GeneFull, Gene Velocyto |
--star-ignore-sjdbgtf |
flag | — | Do not use GTF for SJDB construction (required for Gene Velocyto) |
--seq-center |
string | — | Sequencing center name for BAM read group tag |
--simpleaf-umi-resolution |
enum | — | UMI resolution strategy for alevin-fry: cr-like, cr-like-em, parsimony, parsimony-em, parsimony-gene, parsimony-gene-em |
--kb-workflow |
enum | — | Kallisto workflow: standard, lamanno, nac |
--kb-t1c |
path | — | cDNA transcripts-to-capture file for RNA velocity (lamanno/nac) |
--kb-t2c |
path | — | Intron transcripts-to-capture file for RNA velocity (lamanno/nac) |
--skip-cellbender |
flag | — | Disable the CellBender ambient RNA removal subworkflow |
--skip-emptydrops |
flag | — | Skip emptyDrops cell calling (independent of --skip-cellbender) |
--skip-fastqc |
flag | — | Skip FastQC quality control |
--skip-multiqc |
flag | — | Skip MultiQC report generation |
--skip-cellranger-renaming |
flag | — | Skip automatic sample renaming in CellRanger modules |
--skip-cellrangermulti-vdjref |
flag | — | Skip mkvdjref in cellrangermulti (when VDJ data is absent or a prebuilt --cellranger-vdj-index is supplied) |
--save-reference |
flag | — | Save the built reference index for future reuse |
--save-align-intermeds |
flag | — | Save alignment intermediate BAM files (disabled by default) |
--expected-cells |
int | — | Override expected cell count (≥1) for all samples |
--email |
string | — | Email address for pipeline completion notification |
--multiqc-title |
string | — | Custom title for the MultiQC report |
--resume |
flag | — | Nextflow resume (checksum-verified against prior manifest) |
--run-downstream |
flag | — | Opt in to scrna_orchestrator handoff after pipeline completion |
--cellrangerarc-config |
path | — | Config JSON for CellRanger ARC index construction |
--cellrangerarc-reference |
string | — | Reference genome name used inside the CellRanger ARC config |
--motifs |
path | — | Motif file (e.g. JASPAR) for CellRanger ARC |
--cellranger-vdj-index |
path | — | Prebuilt CellRanger VDJ reference |
--gex-frna-probe-set |
path | — | Probe set CSV for FFPE fixed RNA profiling (cellrangermulti) |
--gex-target-panel |
path | — | Target panel CSV for targeted GEX (cellrangermulti) |
--gex-cmo-set |
path | — | CMO reference CSV for multiplexed samples (cellrangermulti) |
--gex-barcode-sample-assignment |
path | — | Barcode-to-sample assignment CSV for OCM multiplexing (cellrangermulti) |
--fb-reference |
path | — | Feature-barcode reference CSV for antibody capture (cellrangermulti) |
--vdj-inner-enrichment-primers |
path | — | V(D)J cDNA enrichment primer sequences (cellrangermulti) |
--cellranger-multi-barcodes |
path | — | Multiplexed sample samplesheet for CMO/FFPE demultiplexing (cellrangermulti) |
Output Structure
output_directory/
├── report.md # Wrapper run summary
├── result.json # Structured result payload
├── logs/
│ ├── stdout.txt # Nextflow stdout
│ └── stderr.txt # Nextflow stderr
├── upstream/
│ └── results/ # nf-core/scrnaseq output tree
│ ├── fastqc/ # Per-read FastQC reports
│ ├── multiqc/ # MultiQC HTML and data
│ │ └── multiqc_report.html
│ ├── pipeline_info/ # Execution report, timeline, trace, DAG
│ └── <aligner>/ # Aligner-specific outputs
│ ├── <sample>/ # Per-sample STAR/simpleaf/kallisto outputs
│ └── mtx_conversions/ # AnnData (.h5ad), SCE (.rds), Seurat (.rds)
│ ├── <sample>_filtered_matrix.h5ad
│ ├── <sample>_raw_matrix.h5ad
│ ├── combined_filtered_matrix.h5ad ← preferred_h5ad (when present)
│ └── combined_raw_matrix.h5ad
├── reproducibility/
│ ├── samplesheet.valid.csv # Normalized samplesheet (absolute POSIX paths)
│ ├── params.yaml # Effective Nextflow parameters
│ ├── commands.sh # Portable replay script
│ ├── environment.yml # Conda environment spec (for reference)
│ ├── checksums.sha256 # SHA-256 for samplesheet, params, refs, h5ad, MultiQC
│ ├── manifest.json # Run metadata: preset, profile, versions, checksums
│ ├── macos_docker.config # macOS+Docker workarounds (VirtioFS, ARM64, STAR FIFOs)
│ └── remap_paths.py # Helper for replaying on a different machine
└── provenance/
├── inputs.json # Samplesheet and reference paths + checksums
├── invocation.json # Timestamp, preset, profile, pipeline version
├── preflight.json # Java/Nextflow/backend info
├── upstream.json # Pipeline source resolution details
├── outputs.json # Detected artifacts
├── runtime.json # Execution timing
└── skill.json # Skill name and version
Example Output
result.json (abbreviated):
{
"skill": "scrnaseq-pipeline",
"version": "0.1.0",
"summary": {
"preset": "star",
"aligner_effective": "star",
"pipeline_source_kind": "remote_repo",
"pipeline_version_or_commit": "4.1.0",
"profile": "docker",
"preferred_h5ad": "<output>/upstream/results/star/mtx_conversions/combined_filtered_matrix.h5ad",
"handoff_available": true,
"samples_detected": 2,
"cellbender_used": false
}
}
report.md closes with:
## Next Steps
- python clawbio.py run scrna --input <preferred_h5ad> --output <dir>
- python clawbio.py run scrna-embedding --input <preferred_h5ad> --output <dir>
Gotchas
- Preflight runs before any Nextflow call. If Java, Nextflow, or the backend are missing or too old, the pipeline never starts and you get a structured JSON error with
error_codeand afixhint. Nextflow ≥25.04.0 is required. --genomeconflicts with any explicit reference flag. Providing--genomealongside--fasta,--gtf, or any index flag raisesCONFLICTING_REFERENCESin preflight. Use either--genome <shortcut>or explicit flags — never both.igenomes_ignoreis set automatically. Whenever any explicit reference path (fasta, gtf, any index) is provided, the wrapper writesigenomes_ignore: trueto suppress nf-schema DNS validation of the default iGenomes S3 URL. You do not need to set this manually. Use--igenomes-baseonly for local iGenomes mirrors.- Protocol compatibility is enforced before Nextflow starts.
standard,star, andkallistopresets require an explicit non-autoprotocol (e.g.,10XV3,dropseq, or a supported custom chemistry string).standard/simpleaf additionally rejectssmartseq— usestarorkallistofor Smart-seq data.cellranger,cellrangerarc, andcellrangermultiaccept any protocol value;autois the typical upstream recommendation but is not enforced. --skip-cellbenderand--skip-emptydropsare independent flags.--skip-cellbenderdisables the CellBender ambient RNA removal subworkflow;--skip-emptydropsdisables the emptyDrops cell calling step. Both are written as separate parameters inparams.yamland each replays as its own flag incommands.sh. Setting one does not imply the other.--demoforces preset=star and skip_cellbender=true. The nf-core upstreamtestprofile ships STAR-compatible data and explicitly disables CellBender (which does not work on small test datasets). If a different preset is requested with--demo, the wrapper warns and overrides it.preferred_h5admay be absent. If no combined matrix is produced and there are multiple per-sample files,handoff_availableisfalse. Always checkresult.jsonbefore chaining toscrna-orchestratororscrna-embedding.- No arbitrary Nextflow passthrough. All pipeline configuration flows through the preset system and
params.yaml. Direct-c,--outdir, or custom Nextflow flags cannot be injected. --resumeenforces strict compatibility. The wrapper checks that the stored manifest matches the current preset, profile, and pipeline source. Mismatches raiseINVALID_RESUME_STATE.- RNA velocity requires two coordinated flags. For STARsolo:
--star-feature "Gene Velocyto"AND--star-ignore-sjdbgtfmust be passed together. For Kallisto:--kb-workflow lamannoornacwith--kb-t1cand--kb-t2c. cellrangerarcconfig and reference are paired. Providing--cellrangerarc-configwithout--cellrangerarc-reference(or vice versa) raisesINVALID_PRESET_CONFIGURATION.--motifsis optional and independent.cellrangermultivalidates against the samplesheet.feature_type=abrequires--fb-reference;feature_type=cmorequires--cellranger-multi-barcodes;feature_type=vdjwith--skip-cellrangermulti-vdjrefrequires--cellranger-vdj-index. CMO, FFPE probe-set, and OCM multiplexing modes are mutually exclusive.- FASTA schema validation. The FASTA path must match
^\S+\.fn?a(sta)?(\.gz)?$(the nf-core/scrnaseq 4.1.0 schema). Paths with whitespace or non-standard extensions are rejected in preflight. - Local checkout must be a sibling directory. The wrapper looks for
../scrnaseqrelative to the ClawBio repo root. If the checkout path contains whitespace (common on macOS), the wrapper warns and falls back to the remote pipeline. EnsureClawBio/andscrnaseq/share the same parent folder. - macOS Docker workaround is applied automatically. On macOS with Docker,
macos_docker.configis written to the reproducibility bundle and passed to Nextflow. It setsstageInMode = "copy"(avoids VirtioFS EDEADLK),--platform linux/amd64(Rosetta emulation), and routes STAR_STARtmpto the container's/tmp(avoids VirtioFS FIFO limitation). Output directories under/tmpemit a WARNING — use a path under HOME.
Safety
- Local-first: User FASTQs and outputs remain on the local filesystem.
- Strict preflight: Nextflow is never invoked if validation fails.
- No hallucinated outputs: Only artifacts confirmed on disk are reported.
- Disclaimer: Every report includes the ClawBio medical disclaimer.
Agent Boundary
The agent dispatches and explains; this skill executes.
Agent: Interpret the user's preprocessing intent, choose the preset, and verify that handoff_available is true in result.json before routing to downstream skills.
Skill: Validate environment and inputs, run the pipeline with controlled parameters, write all provenance and reproducibility artifacts, and report the detected preferred_h5ad.
Chaining Partners
| Skill | When to chain |
|---|---|
scrna-orchestrator |
After a successful run, pass preferred_h5ad for clustering, QC, and markers |
scrna-embedding |
Pass preferred_h5ad for scVI/scANVI batch integration and latent embeddings |
multiqc-reporter |
Re-aggregate QC across multiple wrapper runs |
Maintenance
Review cadence: After each nf-core/scrnaseq major release. Check NEXTFLOW_MIN_VERSION (schemas.py), SUPPORTED_PRESETS, SUPPORTED_PROFILES, and this SKILL.md for accuracy.
Staleness signals:
- Preflight rejects a Nextflow version that the current pipeline supports → update
NEXTFLOW_MIN_VERSIONinschemas.pyandreproducibility/pinned_versions.json. - New aligners appear upstream but are absent from
PRESET_ALIGNERS→ add toschemas.pyand update tests. - The VirtioFS macOS workaround (
stageInMode = "copy") is only necessary while Apple Silicon runs Docker via QEMU. Remove_write_macos_docker_configwhen a native arm64 Docker runtime eliminates VirtioFS deadlocks.
Deprecation criteria: Deprecate if nf-core/scrnaseq releases a Python SDK with equivalent preflight, params, and provenance APIs.
Citations
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (26,248 bytes)
- 📎 README.md (1,222 bytes)