[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75NSJB7DNHRNY0XWZK2RGTY":3,"skill-same:01M75NSJB7DNHRNY0XWZK2RGTY":299},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":91,"commitSha":92,"skillDirectory":93,"forksCount":94,"repositoryHtmlUrl":95,"repositoryHomepageUrl":6,"ownerHtmlUrl":96,"ownerBlogUrl":97,"ownerDescription":6,"updatedAt":98,"install":99,"resources":111},"01M75NSJB7DNHRNY0XWZK2RGTY","nfcore-scrnaseq-wrapper",null,"Wrapper skill for running nf-core\u002Fscrnaseq 4.1.0 upstream single-cell RNA-seq preprocessing from FASTQ with strict preflight, reproducibility outputs, and downstream handoff to ClawBio scRNA skills.","stanfish06\u002Fskillquarium","stanfish06","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F93099613?v=4","01M75F1CK4ZW109ZK3T26VN52F","Zhiyuan","01M75F1CM53VH6F79DZ8GXKKES",12,"MIT","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: nfcore-scrnaseq-wrapper\ndescription: Wrapper skill for running nf-core\u002Fscrnaseq 4.1.0 upstream single-cell RNA-seq preprocessing from FASTQ with strict preflight, reproducibility outputs, and downstream handoff to ClawBio scRNA\n  skills.\nlicense: MIT\nmetadata:\n  domain: transcriptomics\n  tags:\n  - scrna\n  - single-cell\n  - nextflow\n  - nf-core\n  - fastq\n  - 10x\n  - h5ad\n  - preprocessing\n  dependencies:\n    python: '>=3.11'\n    packages:\n    - pyyaml\n  endpoints:\n    cli: python clawbio.py run scrnaseq-pipeline --input {samplesheet} --output {output_dir}\n  openclaw:\n    requires:\n      bins:\n      - python3\n      - nextflow\n      - java\n    always: false\n    emoji: 🧫\n    homepage: https:\u002F\u002Fgithub.com\u002FClawBio\u002FClawBio\n    os:\n    - darwin\n    - linux\n    trigger_keywords:\n    - scrnaseq\n    - nf-core scrnaseq\n    - run scrnaseq from fastq\n    - preprocess 10x fastqs\n    - generate h5ad from single-cell fastq\n    - single-cell preprocessing\n    - nextflow scrna pipeline\n    - 10x chromium fastq pipeline\n    - starsolo upstream processing\n    - alevin-fry fastq to counts\n    - run nextflow scrnaseq\n    - upstream single-cell pipeline\n    - fastq to h5ad single cell\n    - 10x genomics fastq pipeline\n  author: ClawBio\n  demo_data:\n  - path: demo\u002FREADME.md\n    description: Demo mode uses the upstream nf-core\u002Fscrnaseq -profile test dataset rather than bundled FASTQs\n  inputs:\n  - name: samplesheet\n    type: file\n    format:\n    - csv\n    description: 'nf-core\u002Fscrnaseq samplesheet CSV with required columns: sample, fastq_1, fastq_2'\n    required: true\n  outputs:\n  - name: report\n    type: file\n    format:\n    - md\n    description: Wrapper run summary and downstream handoff recommendations\n  - name: result\n    type: file\n    format:\n    - json\n    description: Structured result payload with detected outputs and provenance\n  version: 0.1.0\n---\n\n# nfcore-scrnaseq-wrapper\n\nYou are **nfcore-scrnaseq-wrapper**, a specialised ClawBio agent for upstream single-cell RNA-seq preprocessing from FASTQ using the `nf-core\u002Fscrnaseq` Nextflow pipeline.\n\n## Trigger\n\n**Fire when:**\n- User wants to run `scrnaseq` from raw FASTQ files\n- User asks to preprocess 10x Chromium single-cell data\n- User wants to execute `nf-core\u002Fscrnaseq`\n- User wants to generate `.h5ad` from raw single-cell FASTQs\n- User asks for primary scRNA preprocessing (FASTQ → h5ad)\n- User mentions `simpleaf`, `STARsolo`, `alevin-fry`, or `kb-python` for upstream processing\n\n**Do NOT fire when:**\n- User already has an `.h5ad` and wants clustering, UMAP, or markers → route to `scrna-orchestrator`\n- User asks for scVI, scANVI, batch correction, or dimensionality reduction → route to `scrna-embedding`\n- User asks about bulk RNA-seq, differential expression, or pseudo-bulk analysis → route to `rnaseq-de`\n- Input is an already-processed count matrix, not raw FASTQs\n\n## Scope\n\nOne skill, one task: run upstream scRNA preprocessing from FASTQ using `nf-core\u002Fscrnaseq` and produce canonical outputs for downstream ClawBio skills.\n\nThis skill does NOT perform clustering, normalization, marker detection, dimensionality reduction, or any analysis on the `.h5ad` it produces.\n\n## Why This Exists\n\n- **Without it**: Users hand-build samplesheets, guess reference combinations, miss backend issues, and struggle to locate the correct `.h5ad` for downstream analysis.\n- **With it**: One validated command runs the pipeline, captures provenance, writes a reproducibility bundle, and points directly to the best downstream handoff artifact.\n- **Why ClawBio**: The wrapper keeps execution local-first, validates before launching Nextflow, and makes the run chainable into `scrna` and `scrna-embedding`.\n\n## Core Capabilities\n\n1. **Strict Preflight**: Validate Java, Nextflow, backend, samplesheet, FASTQs, and references before execution.\n2. **Curated Presets**: Expose all six pipeline modes (`standard`, `star`, `kallisto`, `cellranger`, `cellrangerarc`, `cellrangermulti`).\n3. **Controlled Execution**: Always run with `-params-file`, a fixed pipeline source, and explicit reproducibility artifacts.\n4. **Output Resolution**: Detect MultiQC, pipeline_info, `.h5ad`, `.rds`, and select a canonical `preferred_h5ad` when possible.\n5. **Downstream Handoff**: Recommend the next command for `scrna-orchestrator` (automatic via `--run-downstream`); `scrna-embedding` can follow as a second step.\n\n## Input Formats\n\n| Format | Extension | Required columns (all presets) | Preset-conditional columns | Optional columns |\n|--------|-----------|------------------|------------------|------------------|\n| Samplesheet | `.csv` | `sample`, `fastq_1`, `fastq_2` | `sample_type` + `fastq_barcode` (required for `cellrangerarc`); `feature_type` (required for `cellrangermulti`) | `expected_cells`, `seq_center` |\n| Demo mode | n\u002Fa | none — test profile provides its own data | — | — |\n\nThe wrapper enforces the preset-conditional columns before execution (`samplesheet_builder.py`): a `cellrangerarc` sheet missing `sample_type`\u002F`fastq_barcode`, or a `cellrangermulti` sheet missing `feature_type`, is rejected with `INVALID_SAMPLESHEET`. Independently, **whenever a `sample_type` or `feature_type` value is present — under any preset — it is validated against the nf-core enum** (`sample_type` ∈ {`atac`, `gex`}; `feature_type` ∈ {`gex`, `vdj`, `ab`, `crispr`, `cmo`}), matching the property-level enums in `assets\u002Fschema_input.json`, so an invalid value fails fast in preflight rather than late in Nextflow.\n\n## Workflow\n\n1. **Validate**: Check the selected preset, samplesheet structure, FASTQ accessibility, references, Java, Nextflow, and backend.\n2. **Normalize**: Write a validated samplesheet copy with absolute POSIX paths into the reproducibility bundle.\n3. **Configure**: Build one effective `params.yaml` and a fixed Nextflow command.\n4. **Execute**: Run `nf-core\u002Fscrnaseq` using the local sibling checkout when available, or the pinned remote tag.\n5. **Parse**: Detect MultiQC, pipeline_info, `.h5ad`, `.rds`, and CellBender-derived outputs.\n6. **Generate**: Write `report.md`, `result.json`, provenance JSON files, and reproducibility artifacts.\n7. **Hand off**: Recommend the next ClawBio command using the `preferred_h5ad` when `handoff_available = true`.\n\n## Algorithm \u002F Methodology\n\nThe 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.\n\n1. **Pipeline source resolution** (`pipeline_source.py`): Prefer a local sibling `scrnaseq\u002F` 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). A dirty local checkout is rejected by default; `--allow-dirty-pipeline` is an explicit development-only opt-in that is recorded in provenance. Use `--require-local-pipeline` when fallback to the remote pipeline would be unacceptable.\n\n2. **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 consistent `expected_cells` (≥1) and `seq_center` for repeated sample rows, reject exact duplicate FASTQ rows, and write a normalized copy to `reproducibility\u002Fsamplesheet.valid.csv` with local FASTQ paths resolved to absolute POSIX (remote URIs, accepted only with `--allow-remote-inputs`, are passed through unchanged). The normalized replay sheet contains only headers accepted by the pinned 4.1.0 `assets\u002Fschema_input.json`; unsupported metadata columns are reported and omitted. In particular, `protocol` is supplied through the global `--protocol` parameter and is never forwarded as a samplesheet column.\n\n3. **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) \u003C (24, 4, 0)`). For `docker`, run `docker info` and gate on exit code. For `conda`\u002F`mamba`, locate the binary. Cell Ranger presets are rejected with conda\u002Fmamba unless `--allow-conda-cellranger` is supplied with a trusted site config. For `singularity`\u002F`apptainer`, accept either binary interchangeably. For `wave` and `gpu`, no binary check is needed (Nextflow-native features). Safe institutional profile components are accepted for HPC\u002Fsite profiles, every `-c\u002F--config` file must exist before execution, and configs are treated as trusted Groovy code. All preflight subprocess calls have a 60-second timeout (`_SUBPROCESS_TIMEOUT` in `preflight.py`); the git probes in `pipeline_source.py` use a 10-second timeout.\n\n4. **Params construction** (`params_builder.py`): Translate the preset + CLI flags into a `params.yaml` consumed by Nextflow via `-params-file`. All file paths use `.as_posix()` for forward-slash consistency across platforms. `igenomes_ignore` is automatically set to `true` whenever an explicit **genome** reference (`fasta`, `gtf`, `transcript_fasta`, `txp2gene`, or any prebuilt index) is provided — auxiliary files (barcode whitelist, CMO\u002Fprobe\u002Ffeature sets, primers, multi-barcode samplesheets) never trigger it, so they remain compatible with `--genome` (suppresses nf-schema DNS validation of the default iGenomes S3 URL). Skip flags are only written when `true`, keeping `params.yaml` minimal. In `--demo` mode no reference\u002Fprotocol params are written at all (the test profile owns them).\n\n5. **Command build + execution** (`command_builder.py`, `executor.py`): Construct the `nextflow run` command with `-params-file`, validated `-c\u002F--config` files, and a work directory that defaults to `\u003Coutput>\u002Fupstream\u002Fwork` but may be overridden by `--work-dir` (including object-store URIs for cloud executors), then launch via `subprocess.Popen` with stdout and stderr piped to log files on disk — never buffered in RAM. On `TimeoutExpired`, the process is killed and `EXECUTION_FAILED` is raised. On `KeyboardInterrupt`, the child process tree is terminated before the interrupt is re-raised.\n\n6. **Output parsing** (`outputs_parser.py`): Scan the upstream results tree for MultiQC HTML, `pipeline_info\u002F`, aligner output directories, `.h5ad` (CellBender\u002Ffiltered preferred over generic combined\u002Fraw), `.rds`, CellBender-derived files, and an `official_outputs` manifest for documented nf-core output families. Required outputs are validated before success artifacts are written; `handoff_available` is set to `true` only when a `preferred_h5ad` is confirmed on disk.\n\n7. **Provenance + reporting** (`provenance.py`, `reporting.py`): Write JSON provenance bundles, a SHA-256 checksum manifest (files only — never directories), `environment.yml`, a portable `commands.sh`, `report.md`, and `result.json`.\n\n## Presets\n\n| Preset | Aligner | Use case |\n|--------|---------|---------|\n| `standard` | simpleaf (alevin-fry) | Default for 10x GEX; fast, memory-efficient |\n| `star` | STARsolo | Best FASTQ QC metrics; supports RNA velocity (`--star-feature \"Gene Velocyto\"`) |\n| `kallisto` | kb-python \u002F BUStools | Pseudo-alignment; fastest; lamanno\u002Fnac RNA velocity via `--kb-workflow` |\n| `cellranger` | CellRanger | CellRanger v2\u002Fv3 compatibility; CellRanger is provided by the nf-core container under `docker`\u002F`singularity` (no host binary needed). Not available under `-profile conda` (10x licensing keeps it off bioconda) |\n| `cellrangerarc` | CellRanger ARC | Multiome (GEX + ATAC); accepts prebuilt `--cellranger-index` or reference-build inputs |\n| `cellrangermulti` | CellRanger Multi | GEX + VDJ + feature barcoding; `--cellranger-multi-barcodes` required for CMO\u002FFFPE multiplexing |\n\nEach preset requires at least one reference option: `--genome \u003CiGenomes_shortcut>` OR a pre-built index (`--star-index`, `--simpleaf-index`, etc.) OR `--fasta` + `--gtf`. The `standard`\u002Fsimpleaf preset additionally accepts a transcriptome pair `--transcript-fasta` + `--txp2gene` in place of a genome reference (per the nf-core\u002Fscrnaseq Simpleaf options).\n\n## nf-core\u002Fscrnaseq 4.1.0 Compatibility Policy\n\nThis wrapper targets nf-core\u002Fscrnaseq `4.1.0`. It is not a free-form passthrough. Parameters are grouped as:\n\n- **Supported upstream parameters:** input\u002Foutput, aligner\u002Fpreset, reference\u002Findex, skip, CellRanger, CellRanger ARC, CellRanger Multi, selected MultiQC\u002Freporting options.\n- **Wrapper policy parameters:** `--preset`, `--check`, `--run-downstream`, `--skip-downstream`, `--expected-cells`, `--timeout-hours`, `--work-dir`, `--allow-remote-inputs`, `--allow-dirty-pipeline`, `--require-local-pipeline`, `--allow-pipeline-version-override`, `--trust-config-params`, `--allow-conda-cellranger`, and `-c`\u002F`--config`\u002F`--nextflow-config`; these are ClawBio conveniences and are not nf-core parameters.\n- **Deprecated compatibility aliases:** `skip_emptydrops` is accepted only as `--skip-emptydrops` and translated to `skip_cellbender: true`; the deprecated upstream parameter is never written.\n- **Intentionally unsupported upstream parameters:** `custom_config_version`, `custom_config_base`, `config_profile_name`, `config_profile_description`, `config_profile_contact`, `config_profile_url`, `version`, `plaintext_email`, `max_multiqc_email_size`, `hook_url`, `validate_params`, `pipelines_testdata_base_path`, `help`, `help_full`, `show_hidden`.\n\nUnsupported parameters are either hidden\u002Finstitutional metadata, interactive help\u002Fversion flags, or options that would weaken the wrapper's fixed validation\u002Freproducibility policy.\n\n## Input & Reference Path Policy\n\n**Local-first by default.** Samplesheet FASTQs and reference\u002Findex inputs must be local paths unless you explicitly opt in. Remote URIs (`s3:\u002F\u002F`, `gs:\u002F\u002F`, `https:\u002F\u002F`, `ftp:\u002F\u002F`, …) are **rejected** at preflight with `REMOTE_INPUT_NOT_ALLOWED`, so genetic data and references stay on the local machine and no accidental cloud fetch happens. This guarantee is enforced by the code, not just advertised (`preflight._check_remote_inputs`).\n\n**Opt-in for remote inputs.** Pass `--allow-remote-inputs` to permit remote samplesheet inputs and reference paths (parity with `nfcore-sarek-wrapper` \u002F `nfcore-rnaseq-wrapper`, which share the same flag). When enabled, remote URIs are passed through **verbatim** (Nextflow resolves and stages them; only the FASTQ\u002FFASTA basename is validated) and preflight emits a **runtime WARNING** listing every path that will be fetched over the network, so cloud access is always visible. The object-store `--work-dir` is a separate setting and is not gated.\n\n**Local** paths are still validated eagerly at preflight so they fail fast with a clear error instead of a late Nextflow error:\n- A supplied local reference\u002Findex path (`--fasta`, `--gtf`, `--star-index`, …) that does not exist raises `MISSING_REFERENCE` (`preflight.py`).\n- A local FASTQ that does not exist (or is not a regular file) raises `MISSING_FASTQ` (`samplesheet_builder.py`).\n\nReadability is never pre-checked: Nextflow reads inputs in the true execution context (often a root container under the default Docker profile), so a launcher-side `os.access(R_OK)` probe would false-block valid runs (`errors.py`).\n\n## CLI Reference\n\n```bash\n# Standard real-data usage (explicit protocol and reference are required)\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Fscrnaseq_run \\\n  --preset star --protocol 10XV3 --genome GRCh38\n\n# Preflight check only (no Nextflow execution)\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Fscrnaseq_run --check \\\n  --preset star --protocol 10XV3 --genome GRCh38\n\n# Demo mode (runs the upstream nf-core test profile; forces star preset; uses the\n# selected backend — default --profile docker, which must be running)\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --demo --output .\u002Fscrnaseq_demo\n\n# Via ClawBio runner\npython clawbio.py run scrnaseq-pipeline --input samplesheet.csv --output .\u002Fscrnaseq_run \\\n  --preset star --protocol 10XV3 --genome GRCh38\npython clawbio.py run scrnaseq-pipeline --demo --output .\u002Fscrnaseq_demo\n\n# STARsolo with local FASTA+GTF (STAR index built by the pipeline)\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Frun --preset star --protocol 10XV3 \\\n  --fasta \u002Frefs\u002Fhg38.fa --gtf \u002Frefs\u002Fhg38.gtf\n\n# STARsolo with prebuilt STAR index\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Frun --preset star --protocol 10XV3 \\\n  --star-index \u002Frefs\u002Fstar_index\n\n# STARsolo RNA velocity (star requires an explicit --protocol like every star\u002Fstandard\u002Fkallisto run)\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Frun --preset star --protocol 10XV3 \\\n  --star-feature \"Gene Velocyto\" --star-ignore-sjdbgtf \\\n  --fasta \u002Frefs\u002Fhg38.fa --gtf \u002Frefs\u002Fhg38.gtf\n\n# Simpleaf (standard) with UMI resolution override\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Frun --preset standard --protocol 10XV3 \\\n  --simpleaf-umi-resolution cr-like-em --genome GRCh38\n\n# Kallisto RNA velocity (NAC workflow)\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Frun --preset kallisto --protocol 10XV3 \\\n  --kb-workflow nac --fasta \u002Frefs\u002Fhg38.fa --gtf \u002Frefs\u002Fhg38.gtf\n\n# Air-gapped cluster: local iGenomes mirror\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Frun --preset star --protocol 10XV3 \\\n  --genome GRCh38 --igenomes-base \u002Fmnt\u002Flocal_igenomes\n\n# CellRanger Multi (CMO multiplexing)\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Frun --preset cellrangermulti \\\n  --cellranger-index \u002Frefs\u002Frefdata-gex-GRCh38 \\\n  --gex-cmo-set \u002Frefs\u002Fcmo_set.csv \\\n  --cellranger-multi-barcodes \u002Frefs\u002Fmulti_barcodes.csv\n```\n\n### Key flags\n\n| Flag | Type | Default | Description |\n|------|------|---------|-------------|\n| `--input` | path | — | Samplesheet CSV (`sample,fastq_1,fastq_2`). Required unless `--demo` |\n| `--output` | path | — | Output directory for results and the reproducibility bundle (required) |\n| `--demo` | flag | — | Run the upstream nf-core `test` profile; forces `--preset star` and `skip_cellbender` |\n| `--check` | flag | — | Run preflight only and exit (no Nextflow execution) |\n| `--preset` | string | `standard` | Aligner preset |\n| `--aligner` | string | — | nf-core\u002Fscrnaseq aligner alias for `--preset`: `simpleaf` maps to `standard`; the other values map to same-named presets |\n| `--profile` | string | `docker` | Execution backend or comma-separated nf-core profile list: `docker`, `conda`, `mamba`, `singularity`, `apptainer`, `podman`, `shifter`, `charliecloud`, `wave`, `gpu`, `debug`, `arm64`, `emulate_amd64`, `test`, `test_full`, `test_cellrangermulti`, `test_multiome` |\n| `--pipeline-version` | string | `4.1.0` | Remote `nf-core\u002Fscrnaseq` tag or commit (used when no local sibling checkout is found) |\n| `--allow-dirty-pipeline` | flag | — | Development-only opt-in to run a modified local sibling `scrnaseq\u002F` checkout; rejected by default for production reproducibility |\n| `--require-local-pipeline` | flag | — | Require a verifiable local sibling `scrnaseq\u002F` checkout; fail instead of falling back to the remote pipeline |\n| `--allow-pipeline-version-override` | flag | — | Allow a `--pipeline-version` other than the pinned `4.1.0` contract (warned, recorded in provenance; validations stay 4.1.0) |\n| `--trust-config-params` | flag | — | Allow `-c\u002F--config` files that set `params.*` (otherwise blocked); detected overrides are recorded in provenance |\n| `-c` \u002F `--config` | path | — | Additional Nextflow config file. May be repeated; files are validated, applied to the live run, copied into the reproducibility bundle, and replayed by `commands.sh` |\n| `--protocol` | string | `None` | Chemistry\u002Fprotocol forwarded to the aligner. Required for `standard`, `star`, and `kallisto`; omitted only preserves CellRanger auto-detection for `cellranger`, `cellrangerarc`, and `cellrangermulti`. Explicit `auto` is invalid for `standard`, `star`, and `kallisto`. `smartseq` is valid for `star` and `kallisto` only. Other protocol strings are mapped when known or passed through by nf-core |\n| `--genome` | string | — | iGenomes shortcut (`GRCh38`, `mm10`, etc.) — mutually exclusive with `--fasta`\u002F`--gtf` and all index flags |\n| `--igenomes-base` | string | — | Base URL or local path for iGenomes (default `s3:\u002F\u002Fngi-igenomes\u002Figenomes\u002F`). Use for local mirrors or air-gapped clusters. A **local** base path is existence-checked in preflight when `--genome` is set (remote `s3:\u002F\u002F`\u002F`https:\u002F\u002F` bases are deferred to Nextflow) |\n| `--igenomes-ignore` | flag | — | Do not load the iGenomes reference config. Set automatically whenever an explicit genome reference is supplied; only needed manually in unusual setups |\n| `--fasta` | path | — | Genome FASTA (`.fa`, `.fna`, `.fasta`, `.gz` variants; no whitespace in path) |\n| `--gtf` | path | — | Gene annotation GTF |\n| `--star-index` | path | — | Prebuilt STAR genome index directory |\n| `--simpleaf-index` | path | — | Prebuilt simpleaf\u002Falevin-fry index |\n| `--kallisto-index` | path | — | Prebuilt kallisto index |\n| `--cellranger-index` | path | — | Prebuilt CellRanger or CellRanger ARC reference |\n| `--transcript-fasta` | path | — | Transcriptome FASTA for simpleaf |\n| `--txp2gene` | path | — | Transcript-to-gene mapping for simpleaf |\n| `--barcode-whitelist` | path | — | Custom barcode whitelist (per-aligner format) |\n| `--star-feature` | enum | — | STARsolo feature type: `Gene`, `GeneFull`, `Gene Velocyto` |\n| `--star-ignore-sjdbgtf` | flag | — | Do not use GTF for SJDB construction (required for `Gene Velocyto`) |\n| `--seq-center` | string | — | Sequencing center name for BAM read group tag |\n| `--simpleaf-umi-resolution` | enum | — | UMI resolution strategy for alevin-fry: `cr-like`, `cr-like-em`, `parsimony`, `parsimony-em`, `parsimony-gene`, `parsimony-gene-em` |\n| `--kb-workflow` | enum | — | Kallisto workflow: `standard`, `lamanno`, `nac` |\n| `--kb-t1c` | path | — | cDNA transcripts-to-capture file for RNA velocity (lamanno\u002Fnac). Required only with a prebuilt `--kallisto-index`; auto-generated from `--fasta`\u002F`--gtf` |\n| `--kb-t2c` | path | — | Intron transcripts-to-capture file for RNA velocity (lamanno\u002Fnac). Required only with a prebuilt `--kallisto-index`; auto-generated from `--fasta`\u002F`--gtf` |\n| `--skip-cellbender` | flag | — | Disable the CellBender ambient RNA removal subworkflow |\n| `--skip-emptydrops` | flag | — | Deprecated compatibility alias for `--skip-cellbender`; the wrapper writes `skip_cellbender: true` and never writes deprecated upstream `skip_emptydrops` |\n| `--skip-fastqc` | flag | — | Skip FastQC quality control |\n| `--skip-multiqc` | flag | — | Skip MultiQC report generation |\n| `--skip-cellranger-renaming` | flag | — | Skip automatic sample renaming in CellRanger modules |\n| `--skip-cellrangermulti-vdjref` | flag | — | Skip mkvdjref in cellrangermulti (when VDJ data is absent or a prebuilt `--cellranger-vdj-index` is supplied) |\n| `--save-reference` | flag | — | Save the built reference index for future reuse |\n| `--save-align-intermeds` \u002F `--no-save-align-intermeds` | flag | — | Forward `save_align_intermeds: true`\u002F`false`; when neither is given the upstream nf-core\u002Fscrnaseq 4.1.0 default (`true`) is preserved, so intermediate BAMs are published by default — pass `--no-save-align-intermeds` on large runs to save disk |\n| `--expected-cells` | int | — | Override expected cell count for a single-sample samplesheet; multi-sample runs must set `expected_cells` per row. The wrapper enforces `≥1` (stricter than the upstream `integer` schema, which has no minimum) since a non-positive count is meaningless |\n| `--timeout-hours` | float | `12` | Wall-clock cap for the Nextflow run, in hours. Use `0` to disable the cap for long HPC\u002Fcloud runs whose walltime is enforced by the scheduler. Via the ClawBio runner the runner's own timeout also applies |\n| `--work-dir` | string | `\u003Coutput>\u002Fupstream\u002Fwork` | Nextflow work directory. Local paths are resolved before execution; object-store URIs such as `s3:\u002F\u002F...` or `gs:\u002F\u002F...` are passed through for cloud executors |\n| `--allow-conda-cellranger` | flag | — | Allow Cell Ranger presets with conda\u002Fmamba only when a trusted site config supplies Cell Ranger |\n| `--email` | string | — | Email address for pipeline completion notification |\n| `--email-on-fail` | string | — | Email address for pipeline failure notification |\n| `--multiqc-title` | string | — | Custom title for the MultiQC report |\n| `--multiqc-config` | path | — | Custom MultiQC config YAML |\n| `--multiqc-logo` | path | — | Custom MultiQC logo image |\n| `--multiqc-methods-description` | path | — | Custom MultiQC methods-description YAML |\n| `--publish-dir-mode` | enum | — | Forwarded nf-core publish mode: `symlink`, `rellink`, `link`, `copy`, `copyNoFollow`, or `move` |\n| `--trace-report-suffix` | string | — | Suffix for Nextflow trace\u002Freport\u002Ftimeline filenames |\n| `--monochrome-logs` | flag | — | Disable ANSI colors in nf-core logs |\n| `--resume` | flag | — | Nextflow resume (checksum-verified against prior manifest; preset\u002Fprofile\u002Fsource\u002Fwork-dir must match) |\n| `--run-downstream` | flag | — | Opt in to `scrna_orchestrator` handoff after pipeline completion |\n| `--skip-downstream` | flag | — | Force-skip the downstream handoff even if `--run-downstream` is given (handoff is off by default) |\n| `--cellrangerarc-config` | path | — | Config JSON for CellRanger ARC index construction |\n| `--cellrangerarc-reference` | string | — | Reference genome name used inside the CellRanger ARC config |\n| `--motifs` | path | — | Motif file (e.g. JASPAR) for CellRanger ARC |\n| `--cellranger-vdj-index` | path | — | Prebuilt CellRanger VDJ reference |\n| `--gex-frna-probe-set` | path | — | Probe set CSV for FFPE fixed RNA profiling (`cellrangermulti`) |\n| `--gex-target-panel` | path | — | Target panel CSV for targeted GEX (`cellrangermulti`) |\n| `--gex-cmo-set` | path | — | CMO reference CSV for multiplexed samples (`cellrangermulti`) |\n| `--gex-barcode-sample-assignment` | path | — | Barcode-to-sample assignment override CSV (`cellrangermulti`). **Not** an OCM selector — OCM mode is encoded via the `ocm_ids` column of `--cellranger-multi-barcodes` |\n| `--fb-reference` | path | — | Feature-barcode reference CSV for antibody capture (`cellrangermulti`) |\n| `--vdj-inner-enrichment-primers` | path | — | V(D)J cDNA enrichment primer sequences (`cellrangermulti`) |\n| `--cellranger-multi-barcodes` | path | — | Multiplexed sample samplesheet for CMO\u002FFFPE demultiplexing (`cellrangermulti`) |\n\n## Output Structure\n\n```text\noutput_directory\u002F\n├── report.md                         # Wrapper run summary\n├── result.json                       # Structured result payload\n├── check_result.json                 # Written only with --check (preflight-only mode); no upstream\u002F is produced\n├── logs\u002F\n│   ├── stdout.txt                    # Nextflow stdout\n│   └── stderr.txt                    # Nextflow stderr\n├── upstream\u002F\n│   └── results\u002F                      # nf-core\u002Fscrnaseq output tree\n│       ├── fastqc\u002F                   # Per-read FastQC reports\n│       ├── multiqc\u002F                  # MultiQC HTML and data\n│       │   └── multiqc_report.html\n│       ├── pipeline_info\u002F            # Execution report, timeline, trace, DAG\n│       └── \u003Caligner>\u002F                # Aligner-specific outputs\n│           └── mtx_conversions\u002F      # AnnData (.h5ad), SCE (.rds), Seurat (.rds)\n│               │  # Per nf-core\u002Fscrnaseq 4.1.0 conf\u002Fmodules.config, the concatenated\n│               │  # matrices sit at the TOP of mtx_conversions\u002F while each per-sample\n│               │  # matrix is nested one level deeper under \u003Csample>\u002F (MTX_TO_H5AD\u002F\n│               │  # CONCAT_H5AD\u002FANNDATA_BARCODES rewrite non-combined files to\n│               │  # `${meta.id}\u002F${filename}`). The wrapper scans BOTH depths and does\n│               │  # not hard-code filenames: it ranks whatever .h5ad it finds to pick\n│               │  # one preferred_h5ad (combined > per-sample; within a group\n│               │  # cellbender_filter > filtered > plain > raw, matched on the filename\n│               │  # suffix). combined_* filter-suffixed variants are version-dependent.\n│               ├── combined_matrix.h5ad                       # documented concatenated matrix (top level)\n│               ├── combined_filtered_matrix.h5ad              # version-dependent: filtering ran\n│               ├── combined_cellbender_filter_matrix.h5ad     # version-dependent: CellBender ran → top preference\n│               └── \u003Csample>\u002F                                  # per-sample matrices nested one level deeper\n│                   ├── \u003Csample>_raw_matrix.h5ad\n│                   └── \u003Csample>_filtered_matrix.h5ad          # conditional: filtering ran\n├── reproducibility\u002F                  # Reproducibility + provenance bundle (single directory)\n│   ├── samplesheet.valid.csv         # Normalized samplesheet (absolute POSIX paths); named samplesheet.demo.csv with --demo\n│   ├── params.yaml                   # Effective Nextflow parameters\n│   ├── nextflow_configs\u002F             # Written only when -c\u002F--config is used: copies of the supplied config files, replayed by commands.sh\n│   ├── commands.sh                   # Portable replay script\n│   ├── environment.yml               # Conda environment spec (for reference)\n│   ├── checksums.sha256              # SHA-256 for in-bundle artifacts only; `sha256sum -c` passes from output dir\n│   ├── manifest.json                 # Run metadata: preset, profile, versions, checksums\n│   ├── macos_docker.config           # macOS+Docker workarounds (VirtioFS, ARM64, STAR FIFOs)\n│   ├── remap_paths.py                # Helper for replaying on a different machine\n│   ├── compatibility_policy.json     # Copied policy snapshot (resume\u002Fupdate rules)\n│   ├── pinned_versions.json          # Copied pinned-versions snapshot\n│   ├── inputs.json                   # Samplesheet + fastq\u002Freference paths and digests (reference_checksums)\n│   ├── invocation.json               # Timestamp, preset, profile, pipeline version\n│   ├── preflight.json                # Java\u002FNextflow\u002Fbackend info\n│   ├── upstream.json                 # Pipeline source resolution details\n│   ├── outputs.json                  # Detected artifacts\n│   ├── runtime.json                  # Execution timing\n│   └── skill.json                    # Skill name and version\n├── provenance\u002F                       # Written only with --run-downstream\n│   └── handoff.json                  # Downstream orchestrator path + checksum + outcome\n└── scrna_analysis\u002F                   # Written only with --run-downstream: scrna_orchestrator output\n```\n\n## Example Output\n\n`result.json` (abbreviated):\n```json\n{\n  \"skill\": \"scrnaseq-pipeline\",\n  \"version\": \"0.1.0\",\n  \"summary\": {\n    \"preset\": \"star\",\n    \"aligner_effective\": \"star\",\n    \"pipeline_source_kind\": \"remote_repo\",\n    \"pipeline_version_or_commit\": \"4.1.0\",\n    \"profile\": \"docker\",\n    \"preferred_h5ad\": \"\u003Coutput>\u002Fupstream\u002Fresults\u002Fstar\u002Fmtx_conversions\u002Fcombined_filtered_matrix.h5ad\",\n    \"handoff_available\": true,\n    \"samples_detected\": 2,\n    \"cellbender_used\": false\n  }\n}\n```\n\n`report.md` closes with:\n```\n## Next Steps\n- python clawbio.py run scrna --input \u003Cpreferred_h5ad> --output \u003Cdir>\n- python clawbio.py run scrna-embedding --input \u003Cpreferred_h5ad> --output \u003Cdir>\n```\n\n## Gotchas\n\n- **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_code` and a `fix` hint. Nextflow ≥25.04.0 is required.\n- **Conda\u002FMamba profiles need network access at runtime.** Preflight only verifies the `conda`\u002F`mamba` binary exists — it deliberately does not probe network connectivity (a flaky check that would also reject valid offline caches). With `-profile conda`, Nextflow resolves environments from bioconda\u002Fconda-forge at runtime, so an offline or proxied host can make a task fail mid-run with a confusing resolver error. Cell Ranger presets are rejected with conda\u002Fmamba by default because Cell Ranger is not distributed via bioconda; use `--allow-conda-cellranger` only when a trusted site config provides Cell Ranger. For fully offline\u002Freproducible execution prefer `docker`\u002F`singularity` (pinned containers), or pre-warm the conda package cache before running.\n- **`--genome` conflicts with any explicit genome-reference flag.** Providing `--genome` alongside `--fasta`, `--gtf`, `--transcript-fasta`, `--txp2gene`, or any prebuilt index raises `CONFLICTING_REFERENCES` in preflight. Use either `--genome \u003Cshortcut>` or explicit genome flags — never both. Auxiliary files (barcode whitelist, CMO\u002Fprobe\u002Ffeature sets, primers, multi-barcode samplesheets) are **not** genome references and are compatible with `--genome`.\n- **`igenomes_ignore` is set automatically.** Whenever an explicit **genome** reference (`fasta`, `gtf`, `transcript_fasta`, `txp2gene`, or any prebuilt index) is provided, the wrapper writes `igenomes_ignore: true` to suppress nf-schema DNS validation of the default iGenomes S3 URL. Auxiliary files never trigger it. You do not need to set this manually. Use `--igenomes-base` only for local iGenomes mirrors.\n- **Protocol compatibility is enforced before Nextflow starts.** `standard`, `star`, and `kallisto` require an explicit `--protocol`, because nf-core\u002Fscrnaseq 4.1.0 documents `auto` as CellRanger-only. Explicit `auto` is rejected for those presets. `smartseq` denotes **Smart-seq3** and is accepted for `star` and `kallisto` only; **`smartseq2` is rejected for every preset** because nf-core\u002Fscrnaseq 4.1.0 does not support Smart-seq2. `cellranger` accepts only `auto` and `10XV1`-`10XV4`; `cellrangerarc` accepts only `auto`; `cellrangermulti` is samplesheet-driven. Unknown custom protocol strings are passed through only for `standard`, `star`, and `kallisto`, where nf-core documents custom values.\n- **`save_align_intermeds` defaults to ON in 4.1.0.** Upstream nf-core\u002Fscrnaseq 4.1.0 sets `save_align_intermeds: true` by default, so aligner intermediate BAMs are published into the results tree unless you pass `--no-save-align-intermeds`. On real (non-`--demo`) datasets these intermediates can be tens to hundreds of GB; disable them when you only need the count matrices.\n- **Deprecated upstream parameters:** `skip_emptydrops` is deprecated in nf-core\u002Fscrnaseq 4.1.0. The wrapper accepts `--skip-emptydrops` only as a compatibility alias and emits `skip_cellbender: true`.\n- **`--demo` forces preset=star and skip_cellbender=true.** The nf-core upstream `test` profile 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. **`--demo` also requires network access**: the test profile fetches its FASTQs and references from remote GitHub URLs (nf-core's design — no local test data is bundled), so on an offline\u002Fsandboxed host set `NXF_OFFLINE` and the wrapper fails fast at preflight with `DEMO_REQUIRES_NETWORK` instead of a cryptic Nextflow `does not exist` abort. This does not violate local-first (which governs your *genetic data* — never uploaded); `--demo` only *downloads* nf-core's public test data. For a fully offline run, use your own local `--input` and references.\n- **`--demo` is fully hermetic — every pipeline flag is ignored.** The `test` profile owns the entire pipeline configuration: input, references, protocol, and all QC\u002Fskip\u002Ftuning\u002Fsave\u002Freporting knobs. Because a `-params-file` value overrides profile config in Nextflow, the wrapper writes **only** the four forced essentials into `params.yaml` in demo mode — `outdir`, `aligner` (`star`), `igenomes_ignore`, and `skip_cellbender` — and nothing else. Any other flag you pass with `--demo` (e.g. `--genome`, `--fasta`, an index, `--igenomes-base`, `--protocol`, `--star-feature`, `--skip-fastqc`, `--save-reference`, `--seq-center`, `--publish-dir-mode`, …) is ignored and listed in a WARNING. Demo output validation likewise requires FastQC and MultiQC regardless of any `--skip-*` you pass, since those flags are not written. Drop `--demo` to run on your own inputs.\n- **The Nextflow run has a 12 h wall-clock cap by default.** Large multi-sample STARsolo\u002FCellRanger runs on full genomes can exceed this; raise it with `--timeout-hours \u003Cn>` or pass `--timeout-hours 0` to disable the cap entirely (recommended on HPC\u002Fcloud where the scheduler enforces walltime). When the run targets an object-store work directory (`--work-dir s3:\u002F\u002F…`\u002F`gs:\u002F\u002F…`) or an institutional\u002Fsite profile while the cap is still active, preflight prints a WARNING reminding you to pass `--timeout-hours 0`, since the scheduler — not the wrapper — should bound such runs. When neither the cap fires nor the job is killed, behaviour is unchanged.\n- **Required outputs are checked after Nextflow exits.** The wrapper expects `pipeline_info\u002F`, the effective aligner directory, MultiQC unless `--skip-multiqc`, FastQC HTML\u002FZIP reports unless `--skip-fastqc`, and at least one `.h5ad` matrix. FastQC is a hard requirement for **every** aligner — including the Cell Ranger family (`cellranger`\u002F`cellrangerarc`\u002F`cellrangermulti`) — because nf-core\u002Fscrnaseq 4.1.0 runs FASTQC on the shared input-read channel (`ch_fastq`) *before* any aligner-specific branching and publishes `fastqc\u002F` for all of them (the output docs state \"FastQC is applied to all aligners' input reads\"). A missing `fastqc\u002F` tree on a non-skipped run is therefore a genuine failure, not a tolerated gap. All six presets run the pipeline's `MTX_TO_H5AD` conversion (CellRanger ARC\u002FMulti reuse the CellRanger template), so a completed run with **zero `.h5ad` is treated as a failure** (`EXPECTED_OUTPUTS_NOT_FOUND`) rather than a silent success. A present-but-ambiguous selection (e.g. several per-sample matrices, no combined) does not fail the run; it is signalled by `handoff_available = false`, and `--run-downstream` prints a warning instead of silently returning.\n- **`preferred_h5ad` may be absent.** If no combined matrix is produced and there are multiple per-sample files, `handoff_available` is `false`. Always check `result.json` before chaining to `scrna-orchestrator` or `scrna-embedding`.\n- **No arbitrary Nextflow parameter passthrough.** Pipeline *parameters* flow only through the preset system and `params.yaml`; no custom `--param` flags can be injected. Validated `-c\u002F--config` files are allowed for infrastructure\u002FHPC configuration and are copied into the reproducibility bundle. Note this is a **trust boundary, not a sandbox**: a Nextflow config is executable Groovy (it can set `process.beforeScript`, `process.shell`, etc.), so a `-c` file is as trusted as code you run yourself. The wrapper validates that each config exists and lints it for `params.*` overrides (see the next gotcha), but otherwise does not sandbox its contents — only pass configs you authored or trust.\n- **The work directory defaults to `\u003Coutput>\u002Fupstream\u002Fwork`.** This preserves local resume and bundle portability for workstation\u002FHPC runs. Managed cloud-batch executors that need an object-store work directory can pass `--work-dir s3:\u002F\u002F...` or `--work-dir gs:\u002F\u002F...`; the value is recorded in provenance and replayed by `commands.sh`. Local custom paths are resolved before execution and are less portable than the default.\n- **The published results directory (`outdir`) is intentionally the local `\u003Coutput>\u002Fupstream\u002Fresults`.** This is a wrapper policy, not an nf-core limitation: the wrapper parses the results tree to detect the `preferred_h5ad`, MultiQC, and `pipeline_info\u002F`, and to hand off downstream, so results must land on the local filesystem. This is still compatible with cloud-batch executors — the work directory may be remote (`--work-dir s3:\u002F\u002F...`) while Nextflow copies the published results back to the local `outdir`. There is no `--outdir` override to an object store, because the wrapper could not then parse outputs or chain downstream; for a remote-published run, invoke the upstream pipeline directly. The `--output` directory must also be **outside** the ClawBio source tree — an output inside the repository is rejected at preflight with `OUTPUT_DIR_INSIDE_REPO` (parity with nfcore-rnaseq\u002Fnfcore-sarek) so multi-gigabyte pipeline artifacts never pollute the checkout.\n- **`--pipeline-version` is pinned to the 4.1.0 contract.** The wrapper's parameter set, protocol matrix and output validation are written for nf-core\u002Fscrnaseq 4.1.0, so a different `--pipeline-version` is rejected unless you pass `--allow-pipeline-version-override` (a warned, provenance-recorded opt-in; validations stay 4.1.0).\n- **`-c\u002F--config` files may not set `params.*`.** nf-core advises against setting parameters via `-c`. The wrapper blocks any config that assigns parameters outside the audited `params.yaml` — dotted (`params.aligner = …`), bracket (`params['aligner'] = …`), whole-map (`params = […]`), or a `params { … }` block (including the `{` on the next line). Pass `--trust-config-params` to allow it (detected overrides are recorded in provenance). Note the config is still trusted Groovy and is not sandboxed; this lint only guarantees `params.yaml` stays the single parameter source.\n- **`--resume` enforces strict compatibility.** The wrapper checks that the stored manifest matches the current preset, profile, pipeline source, effective `params.yaml` checksum, and Nextflow work directory. Mismatches raise `INVALID_RESUME_STATE`.\n- **RNA velocity requires coordinated flags and is validated in preflight.** For STARsolo: `--star-feature \"Gene Velocyto\"` requires `--star-ignore-sjdbgtf`. For Kallisto `--kb-workflow lamanno`\u002F`nac`: when the index is built from `--fasta`\u002F`--gtf`, `kb ref` generates the capture files, so `--kb-t1c`\u002F`--kb-t2c` are **not** required (matching the documented fasta+gtf example); they are required only alongside a prebuilt `--kallisto-index`, and supplying exactly one of the two is always rejected. Invalid combinations raise `INVALID_PRESET_CONFIGURATION` before Nextflow starts.\n- **`cellrangerarc` config and reference are paired.** Providing `--cellrangerarc-config` without `--cellrangerarc-reference` (or vice versa) raises `INVALID_PRESET_CONFIGURATION`. `--motifs` is optional and independent.\n- **`cellrangermulti` validates documented preflight constraints.** `feature_type=ab` **or** `feature_type=crispr` requires `--fb-reference` (in nf-core\u002Fscrnaseq 4.1.0 both Antibody Capture and CRISPR Guide Capture share the single `fb_reference` feature reference — there is no separate CRISPR reference param, so a crispr run without it has no feature reference and fails inside Cell Ranger); `feature_type=vdj` with `--skip-cellrangermulti-vdjref` requires `--cellranger-vdj-index`; `--gex-frna-probe-set` (FFPE) requires `--cellranger-multi-barcodes`; `feature_type=cmo` (CMO multiplexing) also requires `--cellranger-multi-barcodes`. The three multiplexing modes nf-core documents as mutually exclusive are encoded **per multiplexed sample** in the `--cellranger-multi-barcodes` samplesheet via the `probe_barcode_ids` (**FFPE**), `cmo_ids` (**CMO**) and `ocm_ids` (**OCM**) columns. The wrapper parses that samplesheet and rejects any physical `sample` that populates more than one of those columns (`INVALID_PRESET_CONFIGURATION`, with `conflicting_modes`). It additionally rejects the run-level FFPE↔CMO flag combination (`--gex-frna-probe-set` with `feature_type=cmo`\u002F`--gex-cmo-set`). Note `--gex-barcode-sample-assignment` is a cell\u002Ftag-calling override, **not** an OCM selector, so it is never treated as a mode. `cellrangermulti` FASTQ filenames are **not** validated by the wrapper (unlike `cellranger`\u002F`cellrangerarc`): Cell Ranger Multi maps libraries through its own multi samplesheet and `[libraries]` config, so the per-file 10x naming is left to Cell Ranger to validate.\n- **FASTA schema validation.** The FASTA path must match `^\\S+\\.fn?a(sta)?(\\.gz)?$` (the nf-core\u002Fscrnaseq 4.1.0 schema). Paths with whitespace or non-standard extensions are rejected in preflight.\n- **Local checkout must be a sibling directory.** The wrapper looks for `..\u002Fscrnaseq` relative to the ClawBio repo root. If the checkout path contains whitespace (common on macOS), the wrapper warns and falls back to the remote pipeline. Ensure `ClawBio\u002F` and `scrnaseq\u002F` share the same parent folder.\n- **Local checkout version is verified.** A sibling checkout is used only when its exact git tag matches `--pipeline-version` or its commit equals `--pipeline-version`. Git-less or unverifiable local directories fall back to the remote pinned pipeline.\n- **The `validation.*` \u002F `validationSchemaIgnoreParams` warnings on a run or a bundle replay come from the pipeline, not from the wrapper. Do NOT try to silence them by adding params.** nf-core\u002Fscrnaseq 4.1.0's own `nextflow.config` declares `plugins { id 'nf-schema@2.5.1' }` and a matching `validation { defaultIgnoreParams = [\"genomes\"]; monochromeLogs = params.monochrome_logs }` scope, and it carries a `monochromeLogs = null` param that upstream itself annotates `\u002F\u002F TODO temporary workaround a warning` (with a matching ignored lint check in its `.nf-core.yml`). nf-schema surfaces that as `WARN: The following invalid input values have been detected: * --validationSchemaIgnoreParams: genomes`. The wrapper writes **none** of these keys — its `params.yaml` carries only the audited CLI surface — and the bundle's `commands.sh` runs the pinned pipeline unmodified, so the same warning appears on a plain upstream `nextflow run nf-core\u002Fscrnaseq -r 4.1.0` too. It is harmless upstream noise: the plugin loads correctly (`Plugins declared=[nf-schema@2.5.1]`) and validation still runs. Writing `validation`\u002F`monochromeLogs` into `params.yaml` to quiet it would override the pipeline's own config and is exactly the wrong fix — the wrapper's \"omit = trust upstream default\" rule applies. A regression test pins that these keys never enter `params.yaml`.\n- **macOS Docker workaround is applied automatically.** On macOS with Docker, `macos_docker.config` is written to the reproducibility bundle and passed to Nextflow. It sets `stageInMode = \"copy\"` (avoids VirtioFS EDEADLK), `--platform linux\u002Famd64` (Rosetta emulation), and routes STAR `_STARtmp` to the container's `\u002Ftmp` (avoids VirtioFS FIFO limitation). These three workarounds apply to **every** macOS+Docker run. A `resourceLimits` block (`cpus 4, memory 15.GB`) is written **only for `--demo` runs**, with `time` raised to `4.h` (the upstream `conf\u002Ftest.config` caps tasks at `1.h`, too short for STAR genome generation under Apple-Silicon emulation). These ceilings are test-machine sized and are never applied to real datasets (a human STAR index needs far more than 15 GB). One consequence: a `--demo` run is capped at `4.h` on macOS+Docker but at the upstream `1.h` on Linux. **On non-macOS docker, a real (non-demo) run instead writes a host-scaled `process.resourceLimits` config** (physical RAM minus headroom, bounded by the Docker `MemTotal` when known) so the local executor does not abort with `Process requirement exceeds available memory` when a process's production request — e.g. STARsolo's index build — exceeds this machine. This follows nf-core's resourceLimits guidance (limits should match the machine maximum) and carries no 15 GB ceiling. It is written to `reproducibility\u002Fresource_limits.config` and shipped in the bundle; `commands.sh` re-applies it on non-macOS replay hosts so a from-scratch reproduction on the generating machine does not re-abort on memory. Override with your own `-c process { resourceLimits = [...] }` if needed. Output directories under `\u002Ftmp` emit a WARNING — use a path under HOME.\n\n## Safety\n\n- **Local-first by default**: user FASTQs\u002Freferences and outputs stay on the local filesystem. Remote input\u002Freference URIs are rejected (`REMOTE_INPUT_NOT_ALLOWED`) unless `--allow-remote-inputs` is explicitly passed, which also logs a runtime warning naming every path fetched over the network. `--allow-remote-inputs` relaxes only the wrapper's own preflight check: remote FASTQ\u002Freference URIs are then written into the normalized samplesheet\u002F`params.yaml` **verbatim** and staged natively by Nextflow at run time. The wrapper does not download them itself, so remote inputs require outbound network access and are incompatible with `NXF_OFFLINE` — under offline mode Nextflow's own file-existence validation (nf-schema) still runs and will fail on the remote paths.\n- **Strict preflight**: Nextflow is never invoked if validation fails.\n- **No hallucinated outputs**: Only artifacts confirmed on disk are reported.\n- **Disclaimer**: Every report includes the ClawBio medical disclaimer.\n\n## Reproducibility Scope\n\nThe bundle guarantees **configuration- and provenance-level** reproducibility, not bit-for-bit identical scientific results. Be explicit about the boundary:\n\n**Guaranteed (captured in the bundle):**\n- Pipeline pinned by `-r \u003Cversion>` (or a git-verified local checkout commit).\n- Nextflow engine pinned via `export NXF_VER=\u003Cversion>` in `commands.sh`.\n- Effective `params.yaml` + SHA-256; `--resume` rejects a mismatched params checksum.\n- `checksums.sha256` (relative labels — `sha256sum -c` passes after the bundle is copied to any folder), reference-file digests in `inputs.json`, and a portable self-anchoring `commands.sh` + `remap_paths.py`. Because `commands.sh` self-anchors and `params.yaml` stores output-relative paths, **relocating the output directory needs no rewrite** — unlike the rnaseq\u002Fsarek bundles you do not pass `remap_paths.py --output-dir`; it is accepted for CLI parity and simply confirms this. Use `remap_paths.py --old\u002F--new` and `--refs-old\u002F--refs-new` only when the FASTQ\u002Freference paths themselves move.\n\n**NOT guaranteed (outside the wrapper's control):**\n- **Bit-for-bit identical outputs.** Aligner thread-count can reorder records, and **CellBender is stochastic** (random-seed driven), so the same inputs+versions may not yield byte-identical `.h5ad`.\n- **Container immutability.** Images are pinned by the tag nf-core ships, not by an immutable digest; a re-published tag could change the binaries.\n- **`conda`\u002F`mamba` is not offline-reproducible** — environments resolve from channels at run time (prefer `docker`\u002F`singularity`).\n- **External reference bytes are not bundled** — `--genome` pulls from iGenomes S3; local refs are checksummed for provenance but not copied into the bundle.\n\nTo approach bit-level reproduction: use `docker`\u002F`singularity` (not conda), pin container digests, fix tool seeds where the pipeline allows, and archive the exact reference files alongside the bundle.\n\n## Agent Boundary\n\nThe agent dispatches and explains; this skill executes.\n\n**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.\n\n**Skill**: Validate environment and inputs, run the pipeline with controlled parameters, write all provenance and reproducibility artifacts, and report the detected `preferred_h5ad`.\n\n## Chaining Partners\n\n| Skill | When to chain |\n|-------|--------------|\n| `scrna-orchestrator` | After a successful run, pass `preferred_h5ad` for clustering, QC, and markers |\n| `scrna-embedding` | Pass `preferred_h5ad` for scVI\u002FscANVI batch integration and latent embeddings |\n| `multiqc-reporter` | Re-aggregate QC across multiple wrapper runs |\n\n## Maintenance\n\n**Review cadence**: After each nf-core\u002Fscrnaseq major release. Check `NEXTFLOW_MIN_VERSION` (`schemas.py`), `SUPPORTED_PRESETS`, `SUPPORTED_PROFILES`, and this SKILL.md for accuracy.\n\n**Staleness signals**:\n- Preflight rejects a Nextflow version that the current pipeline supports → update `NEXTFLOW_MIN_VERSION` in `schemas.py` and `reproducibility\u002Fpinned_versions.json`.\n- New aligners appear upstream but are absent from `PRESET_ALIGNERS` → add to `schemas.py` and update tests.\n- New reference\u002Findex inputs appear upstream → add them to `GENOME_REFERENCE_FIELDS` or `AUXILIARY_PATH_FIELDS` in `schemas.py` (the single source both `params_builder` and `preflight` consume). Never re-introduce per-module copies.\n- The pinned `STAR_ALIGN_BASE_EXT_ARGS` in `nfcore_4_1_0_contract.py` drifts from `conf\u002Fmodules.config` → `test_pinned_star_args_match_sibling_checkout_if_present` fails when a sibling checkout is present; update the constant to match.\n- The VirtioFS macOS workaround (`stageInMode = \"copy\"`) is only necessary while Apple Silicon runs Docker via QEMU. Remove `build_macos_docker_config` \u002F `write_macos_docker_config` when a native arm64 Docker runtime eliminates VirtioFS deadlocks.\n\n**Deprecation criteria**: Deprecate if nf-core\u002Fscrnaseq releases a Python SDK with equivalent preflight, params, and provenance APIs.\n\n## Citations\n\n- [nf-core\u002Fscrnaseq 4.1.0](https:\u002F\u002Fnf-co.re\u002Fscrnaseq\u002F4.1.0)\n- [nf-core\u002Fscrnaseq usage](https:\u002F\u002Fnf-co.re\u002Fscrnaseq\u002F4.1.0\u002Fdocs\u002Fusage\u002F)\n- [nf-core\u002Fscrnaseq parameters](https:\u002F\u002Fnf-co.re\u002Fscrnaseq\u002F4.1.0\u002Fparameters\u002F)\n- [nf-core\u002Fscrnaseq output](https:\u002F\u002Fnf-co.re\u002Fscrnaseq\u002F4.1.0\u002Fdocs\u002Foutput\u002F)\n- [Nextflow](https:\u002F\u002Fwww.nextflow.io\u002F)\n- [Alevin-fry \u002F Simpleaf](https:\u002F\u002Fsimpleaf.readthedocs.io\u002F)\n- [STARsolo](https:\u002F\u002Fgithub.com\u002Falexdobin\u002FSTAR\u002Fblob\u002Fmaster\u002Fdocs\u002FSTARsolo.md)\n- [kb-python \u002F BUStools](https:\u002F\u002Fwww.kallistobus.tools\u002F)\n","# nfcore-scrnaseq-wrapper\n\nYou are **nfcore-scrnaseq-wrapper**, a specialised ClawBio agent for upstream single-cell RNA-seq preprocessing from FASTQ using the `nf-core\u002Fscrnaseq` Nextflow pipeline.\n\n## Trigger\n\n**Fire when:**\n- User wants to run `scrnaseq` from raw FASTQ files\n- User asks to preprocess 10x Chromium single-cell data\n- User wants to execute `nf-core\u002Fscrnaseq`\n- User wants to generate `.h5ad` from raw single-cell FASTQs\n- User asks for primary scRNA preprocessing (FASTQ → h5ad)\n- User mentions `simpleaf`, `STARsolo`, `alevin-fry`, or `kb-python` for upstream processing\n\n**Do NOT fire when:**\n- User already has an `.h5ad` and wants clustering, UMAP, or markers → route to `scrna-orchestrator`\n- User asks for scVI, scANVI, batch correction, or dimensionality reduction → route to `scrna-embedding`\n- User asks about bulk RNA-seq, differential expression, or pseudo-bulk analysis → route to `rnaseq-de`\n- Input is an already-processed count matrix, not raw FASTQs\n\n## Scope\n\nOne skill, one task: run upstream scRNA preprocessing from FASTQ using `nf-core\u002Fscrnaseq` and produce canonical outputs for downstream ClawBio skills.\n\nThis skill does NOT perform clustering, normalization, marker detection, dimensionality reduction, or any analysis on the `.h5ad` it produces.\n\n## Why This Exists\n\n- **Without it**: Users hand-build samplesheets, guess reference combinations, miss backend issues, and struggle to locate the correct `.h5ad` for downstream analysis.\n- **With it**: One validated command runs the pipeline, captures provenance, writes a reproducibility bundle, and points directly to the best downstream handoff artifact.\n- **Why ClawBio**: The wrapper keeps execution local-first, validates before launching Nextflow, and makes the run chainable into `scrna` and `scrna-embedding`.\n\n## Core Capabilities\n\n1. **Strict Preflight**: Validate Java, Nextflow, backend, samplesheet, FASTQs, and references before execution.\n2. **Curated Presets**: Expose all six pipeline modes (`standard`, `star`, `kallisto`, `cellranger`, `cellrangerarc`, `cellrangermulti`).\n3. **Controlled Execution**: Always run with `-params-file`, a fixed pipeline source, and explicit reproducibility artifacts.\n4. **Output Resolution**: Detect MultiQC, pipeline_info, `.h5ad`, `.rds`, and select a canonical `preferred_h5ad` when possible.\n5. **Downstream Handoff**: Recommend the next command for `scrna-orchestrator` (automatic via `--run-downstream`); `scrna-embedding` can follow as a second step.\n\n## Input Formats\n\n| Format | Extension | Required columns (all presets) | Preset-conditional columns | Optional columns |\n|--------|-----------|------------------|------------------|------------------|\n| Samplesheet | `.csv` | `sample`, `fastq_1`, `fastq_2` | `sample_type` + `fastq_barcode` (required for `cellrangerarc`); `feature_type` (required for `cellrangermulti`) | `expected_cells`, `seq_center` |\n| Demo mode | n\u002Fa | none — test profile provides its own data | — | — |\n\nThe wrapper enforces the preset-conditional columns before execution (`samplesheet_builder.py`): a `cellrangerarc` sheet missing `sample_type`\u002F`fastq_barcode`, or a `cellrangermulti` sheet missing `feature_type`, is rejected with `INVALID_SAMPLESHEET`. Independently, **whenever a `sample_type` or `feature_type` value is present — under any preset — it is validated against the nf-core enum** (`sample_type` ∈ {`atac`, `gex`}; `feature_type` ∈ {`gex`, `vdj`, `ab`, `crispr`, `cmo`}), matching the property-level enums in `assets\u002Fschema_input.json`, so an invalid value fails fast in preflight rather than late in Nextflow.\n\n## Workflow\n\n1. **Validate**: Check the selected preset, samplesheet structure, FASTQ accessibility, references, Java, Nextflow, and backend.\n2. **Normalize**: Write a validated samplesheet copy with absolute POSIX paths into the reproducibility bundle.\n3. **Configure**: Build one effective `params.yaml` and a fixed Nextflow command.\n4. **Execute**: Run `nf-core\u002Fscrnaseq` using the local sibling checkout when available, or the pinned remote tag.\n5. **Parse**: Detect MultiQC, pipeline_info, `.h5ad`, `.rds`, and CellBender-derived outputs.\n6. **Generate**: Write `report.md`, `result.json`, provenance JSON files, and reproducibility artifacts.\n7. **Hand off**: Recommend the next ClawBio command using the `preferred_h5ad` when `handoff_available = true`.\n\n## Algorithm \u002F Methodology\n\nThe 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.\n\n1. **Pipeline source resolution** (`pipeline_source.py`): Prefer a local sibling `scrnaseq\u002F` 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). A dirty local checkout is rejected by default; `--allow-dirty-pipeline` is an explicit development-only opt-in that is recorded in provenance. Use `--require-local-pipeline` when fallback to the remote pipeline would be unacceptable.\n\n2. **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 consistent `expected_cells` (≥1) and `seq_center` for repeated sample rows, reject exact duplicate FASTQ rows, and write a normalized copy to `reproducibility\u002Fsamplesheet.valid.csv` with local FASTQ paths resolved to absolute POSIX (remote URIs, accepted only with `--allow-remote-inputs`, are passed through unchanged). The normalized replay sheet contains only headers accepted by the pinned 4.1.0 `assets\u002Fschema_input.json`; unsupported metadata columns are reported and omitted. In particular, `protocol` is supplied through the global `--protocol` parameter and is never forwarded as a samplesheet column.\n\n3. **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) \u003C (24, 4, 0)`). For `docker`, run `docker info` and gate on exit code. For `conda`\u002F`mamba`, locate the binary. Cell Ranger presets are rejected with conda\u002Fmamba unless `--allow-conda-cellranger` is supplied with a trusted site config. For `singularity`\u002F`apptainer`, accept either binary interchangeably. For `wave` and `gpu`, no binary check is needed (Nextflow-native features). Safe institutional profile components are accepted for HPC\u002Fsite profiles, every `-c\u002F--config` file must exist before execution, and configs are treated as trusted Groovy code. All preflight subprocess calls have a 60-second timeout (`_SUBPROCESS_TIMEOUT` in `preflight.py`); the git probes in `pipeline_source.py` use a 10-second timeout.\n\n4. **Params construction** (`params_builder.py`): Translate the preset + CLI flags into a `params.yaml` consumed by Nextflow via `-params-file`. All file paths use `.as_posix()` for forward-slash consistency across platforms. `igenomes_ignore` is automatically set to `true` whenever an explicit **genome** reference (`fasta`, `gtf`, `transcript_fasta`, `txp2gene`, or any prebuilt index) is provided — auxiliary files (barcode whitelist, CMO\u002Fprobe\u002Ffeature sets, primers, multi-barcode samplesheets) never trigger it, so they remain compatible with `--genome` (suppresses nf-schema DNS validation of the default iGenomes S3 URL). Skip flags are only written when `true`, keeping `params.yaml` minimal. In `--demo` mode no reference\u002Fprotocol params are written at all (the test profile owns them).\n\n5. **Command build + execution** (`command_builder.py`, `executor.py`): Construct the `nextflow run` command with `-params-file`, validated `-c\u002F--config` files, and a work directory that defaults to `\u003Coutput>\u002Fupstream\u002Fwork` but may be overridden by `--work-dir` (including object-store URIs for cloud executors), then launch via `subprocess.Popen` with stdout and stderr piped to log files on disk — never buffered in RAM. On `TimeoutExpired`, the process is killed and `EXECUTION_FAILED` is raised. On `KeyboardInterrupt`, the child process tree is terminated before the interrupt is re-raised.\n\n6. **Output parsing** (`outputs_parser.py`): Scan the upstream results tree for MultiQC HTML, `pipeline_info\u002F`, aligner output directories, `.h5ad` (CellBender\u002Ffiltered preferred over generic combined\u002Fraw), `.rds`, CellBender-derived files, and an `official_outputs` manifest for documented nf-core output families. Required outputs are validated before success artifacts are written; `handoff_available` is set to `true` only when a `preferred_h5ad` is confirmed on disk.\n\n7. **Provenance + reporting** (`provenance.py`, `reporting.py`): Write JSON provenance bundles, a SHA-256 checksum manifest (files only — never directories), `environment.yml`, a portable `commands.sh`, `report.md`, and `result.json`.\n\n## Presets\n\n| Preset | Aligner | Use case |\n|--------|---------|---------|\n| `standard` | simpleaf (alevin-fry) | Default for 10x GEX; fast, memory-efficient |\n| `star` | STARsolo | Best FASTQ QC metrics; supports RNA velocity (`--star-feature \"Gene Velocyto\"`) |\n| `kallisto` | kb-python \u002F BUStools | Pseudo-alignment; fastest; lamanno\u002Fnac RNA velocity via `--kb-workflow` |\n| `cellranger` | CellRanger | CellRanger v2\u002Fv3 compatibility; CellRanger is provided by the nf-core container under `docker`\u002F`singularity` (no host binary needed). Not available under `-profile conda` (10x licensing keeps it off bioconda) |\n| `cellrangerarc` | CellRanger ARC | Multiome (GEX + ATAC); accepts prebuilt `--cellranger-index` or reference-build inputs |\n| `cellrangermulti` | CellRanger Multi | GEX + VDJ + feature barcoding; `--cellranger-multi-barcodes` required for CMO\u002FFFPE multiplexing |\n\nEach preset requires at least one reference option: `--genome \u003CiGenomes_shortcut>` OR a pre-built index (`--star-index`, `--simpleaf-index`, etc.) OR `--fasta` + `--gtf`. The `standard`\u002Fsimpleaf preset additionally accepts a transcriptome pair `--transcript-fasta` + `--txp2gene` in place of a genome reference (per the nf-core\u002Fscrnaseq Simpleaf options).\n\n## nf-core\u002Fscrnaseq 4.1.0 Compatibility Policy\n\nThis wrapper targets nf-core\u002Fscrnaseq `4.1.0`. It is not a free-form passthrough. Parameters are grouped as:\n\n- **Supported upstream parameters:** input\u002Foutput, aligner\u002Fpreset, reference\u002Findex, skip, CellRanger, CellRanger ARC, CellRanger Multi, selected MultiQC\u002Freporting options.\n- **Wrapper policy parameters:** `--preset`, `--check`, `--run-downstream`, `--skip-downstream`, `--expected-cells`, `--timeout-hours`, `--work-dir`, `--allow-remote-inputs`, `--allow-dirty-pipeline`, `--require-local-pipeline`, `--allow-pipeline-version-override`, `--trust-config-params`, `--allow-conda-cellranger`, and `-c`\u002F`--config`\u002F`--nextflow-config`; these are ClawBio conveniences and are not nf-core parameters.\n- **Deprecated compatibility aliases:** `skip_emptydrops` is accepted only as `--skip-emptydrops` and translated to `skip_cellbender: true`; the deprecated upstream parameter is never written.\n- **Intentionally unsupported upstream parameters:** `custom_config_version`, `custom_config_base`, `config_profile_name`, `config_profile_description`, `config_profile_contact`, `config_profile_url`, `version`, `plaintext_email`, `max_multiqc_email_size`, `hook_url`, `validate_params`, `pipelines_testdata_base_path`, `help`, `help_full`, `show_hidden`.\n\nUnsupported parameters are either hidden\u002Finstitutional metadata, interactive help\u002Fversion flags, or options that would weaken the wrapper's fixed validation\u002Freproducibility policy.\n\n## Input & Reference Path Policy\n\n**Local-first by default.** Samplesheet FASTQs and reference\u002Findex inputs must be local paths unless you explicitly opt in. Remote URIs (`s3:\u002F\u002F`, `gs:\u002F\u002F`, `https:\u002F\u002F`, `ftp:\u002F\u002F`, …) are **rejected** at preflight with `REMOTE_INPUT_NOT_ALLOWED`, so genetic data and references stay on the local machine and no accidental cloud fetch happens. This guarantee is enforced by the code, not just advertised (`preflight._check_remote_inputs`).\n\n**Opt-in for remote inputs.** Pass `--allow-remote-inputs` to permit remote samplesheet inputs and reference paths (parity with `nfcore-sarek-wrapper` \u002F `nfcore-rnaseq-wrapper`, which share the same flag). When enabled, remote URIs are passed through **verbatim** (Nextflow resolves and stages them; only the FASTQ\u002FFASTA basename is validated) and preflight emits a **runtime WARNING** listing every path that will be fetched over the network, so cloud access is always visible. The object-store `--work-dir` is a separate setting and is not gated.\n\n**Local** paths are still validated eagerly at preflight so they fail fast with a clear error instead of a late Nextflow error:\n- A supplied local reference\u002Findex path (`--fasta`, `--gtf`, `--star-index`, …) that does not exist raises `MISSING_REFERENCE` (`preflight.py`).\n- A local FASTQ that does not exist (or is not a regular file) raises `MISSING_FASTQ` (`samplesheet_builder.py`).\n\nReadability is never pre-checked: Nextflow reads inputs in the true execution context (often a root container under the default Docker profile), so a launcher-side `os.access(R_OK)` probe would false-block valid runs (`errors.py`).\n\n## CLI Reference\n\n```bash\n# Standard real-data usage (explicit protocol and reference are required)\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Fscrnaseq_run \\\n  --preset star --protocol 10XV3 --genome GRCh38\n\n# Preflight check only (no Nextflow execution)\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Fscrnaseq_run --check \\\n  --preset star --protocol 10XV3 --genome GRCh38\n\n# Demo mode (runs the upstream nf-core test profile; forces star preset; uses the\n# selected backend — default --profile docker, which must be running)\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --demo --output .\u002Fscrnaseq_demo\n\n# Via ClawBio runner\npython clawbio.py run scrnaseq-pipeline --input samplesheet.csv --output .\u002Fscrnaseq_run \\\n  --preset star --protocol 10XV3 --genome GRCh38\npython clawbio.py run scrnaseq-pipeline --demo --output .\u002Fscrnaseq_demo\n\n# STARsolo with local FASTA+GTF (STAR index built by the pipeline)\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Frun --preset star --protocol 10XV3 \\\n  --fasta \u002Frefs\u002Fhg38.fa --gtf \u002Frefs\u002Fhg38.gtf\n\n# STARsolo with prebuilt STAR index\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Frun --preset star --protocol 10XV3 \\\n  --star-index \u002Frefs\u002Fstar_index\n\n# STARsolo RNA velocity (star requires an explicit --protocol like every star\u002Fstandard\u002Fkallisto run)\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Frun --preset star --protocol 10XV3 \\\n  --star-feature \"Gene Velocyto\" --star-ignore-sjdbgtf \\\n  --fasta \u002Frefs\u002Fhg38.fa --gtf \u002Frefs\u002Fhg38.gtf\n\n# Simpleaf (standard) with UMI resolution override\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Frun --preset standard --protocol 10XV3 \\\n  --simpleaf-umi-resolution cr-like-em --genome GRCh38\n\n# Kallisto RNA velocity (NAC workflow)\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Frun --preset kallisto --protocol 10XV3 \\\n  --kb-workflow nac --fasta \u002Frefs\u002Fhg38.fa --gtf \u002Frefs\u002Fhg38.gtf\n\n# Air-gapped cluster: local iGenomes mirror\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Frun --preset star --protocol 10XV3 \\\n  --genome GRCh38 --igenomes-base \u002Fmnt\u002Flocal_igenomes\n\n# CellRanger Multi (CMO multiplexing)\npython skills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py \\\n  --input samplesheet.csv --output .\u002Frun --preset cellrangermulti \\\n  --cellranger-index \u002Frefs\u002Frefdata-gex-GRCh38 \\\n  --gex-cmo-set \u002Frefs\u002Fcmo_set.csv \\\n  --cellranger-multi-barcodes \u002Frefs\u002Fmulti_barcodes.csv\n```\n\n### Key flags\n\n| Flag | Type | Default | Description |\n|------|------|---------|-------------|\n| `--input` | path | — | Samplesheet CSV (`sample,fastq_1,fastq_2`). Required unless `--demo` |\n| `--output` | path | — | Output directory for results and the reproducibility bundle (required) |\n| `--demo` | flag | — | Run the upstream nf-core `test` profile; forces `--preset star` and `skip_cellbender` |\n| `--check` | flag | — | Run preflight only and exit (no Nextflow execution) |\n| `--preset` | string | `standard` | Aligner preset |\n| `--aligner` | string | — | nf-core\u002Fscrnaseq aligner alias for `--preset`: `simpleaf` maps to `standard`; the other values map to same-named presets |\n| `--profile` | string | `docker` | Execution backend or comma-separated nf-core profile list: `docker`, `conda`, `mamba`, `singularity`, `apptainer`, `podman`, `shifter`, `charliecloud`, `wave`, `gpu`, `debug`, `arm64`, `emulate_amd64`, `test`, `test_full`, `test_cellrangermulti`, `test_multiome` |\n| `--pipeline-version` | string | `4.1.0` | Remote `nf-core\u002Fscrnaseq` tag or commit (used when no local sibling checkout is found) |\n| `--allow-dirty-pipeline` | flag | — | Development-only opt-in to run a modified local sibling `scrnaseq\u002F` checkout; rejected by default for production reproducibility |\n| `--require-local-pipeline` | flag | — | Require a verifiable local sibling `scrnaseq\u002F` checkout; fail instead of falling back to the remote pipeline |\n| `--allow-pipeline-version-override` | flag | — | Allow a `--pipeline-version` other than the pinned `4.1.0` contract (warned, recorded in provenance; validations stay 4.1.0) |\n| `--trust-config-params` | flag | — | Allow `-c\u002F--config` files that set `params.*` (otherwise blocked); detected overrides are recorded in provenance |\n| `-c` \u002F `--config` | path | — | Additional Nextflow config file. May be repeated; files are validated, applied to the live run, copied into the reproducibility bundle, and replayed by `commands.sh` |\n| `--protocol` | string | `None` | Chemistry\u002Fprotocol forwarded to the aligner. Required for `standard`, `star`, and `kallisto`; omitted only preserves CellRanger auto-detection for `cellranger`, `cellrangerarc`, and `cellrangermulti`. Explicit `auto` is invalid for `standard`, `star`, and `kallisto`. `smartseq` is valid for `star` and `kallisto` only. Other protocol strings are mapped when known or passed through by nf-core |\n| `--genome` | string | — | iGenomes shortcut (`GRCh38`, `mm10`, etc.) — mutually exclusive with `--fasta`\u002F`--gtf` and all index flags |\n| `--igenomes-base` | string | — | Base URL or local path for iGenomes (default `s3:\u002F\u002Fngi-igenomes\u002Figenomes\u002F`). Use for local mirrors or air-gapped clusters. A **local** base path is existence-checked in preflight when `--genome` is set (remote `s3:\u002F\u002F`\u002F`https:\u002F\u002F` bases are deferred to Nextflow) |\n| `--igenomes-ignore` | flag | — | Do not load the iGenomes reference config. Set automatically whenever an explicit genome reference is supplied; only needed manually in unusual setups |\n| `--fasta` | path | — | Genome FASTA (`.fa`, `.fna`, `.fasta`, `.gz` variants; no whitespace in path) |\n| `--gtf` | path | — | Gene annotation GTF |\n| `--star-index` | path | — | Prebuilt STAR genome index directory |\n| `--simpleaf-index` | path | — | Prebuilt simpleaf\u002Falevin-fry index |\n| `--kallisto-index` | path | — | Prebuilt kallisto index |\n| `--cellranger-index` | path | — | Prebuilt CellRanger or CellRanger ARC reference |\n| `--transcript-fasta` | path | — | Transcriptome FASTA for simpleaf |\n| `--txp2gene` | path | — | Transcript-to-gene mapping for simpleaf |\n| `--barcode-whitelist` | path | — | Custom barcode whitelist (per-aligner format) |\n| `--star-feature` | enum | — | STARsolo feature type: `Gene`, `GeneFull`, `Gene Velocyto` |\n| `--star-ignore-sjdbgtf` | flag | — | Do not use GTF for SJDB construction (required for `Gene Velocyto`) |\n| `--seq-center` | string | — | Sequencing center name for BAM read group tag |\n| `--simpleaf-umi-resolution` | enum | — | UMI resolution strategy for alevin-fry: `cr-like`, `cr-like-em`, `parsimony`, `parsimony-em`, `parsimony-gene`, `parsimony-gene-em` |\n| `--kb-workflow` | enum | — | Kallisto workflow: `standard`, `lamanno`, `nac` |\n| `--kb-t1c` | path | — | cDNA transcripts-to-capture file for RNA velocity (lamanno\u002Fnac). Required only with a prebuilt `--kallisto-index`; auto-generated from `--fasta`\u002F`--gtf` |\n| `--kb-t2c` | path | — | Intron transcripts-to-capture file for RNA velocity (lamanno\u002Fnac). Required only with a prebuilt `--kallisto-index`; auto-generated from `--fasta`\u002F`--gtf` |\n| `--skip-cellbender` | flag | — | Disable the CellBender ambient RNA removal subworkflow |\n| `--skip-emptydrops` | flag | — | Deprecated compatibility alias for `--skip-cellbender`; the wrapper writes `skip_cellbender: true` and never writes deprecated upstream `skip_emptydrops` |\n| `--skip-fastqc` | flag | — | Skip FastQC quality control |\n| `--skip-multiqc` | flag | — | Skip MultiQC report generation |\n| `--skip-cellranger-renaming` | flag | — | Skip automatic sample renaming in CellRanger modules |\n| `--skip-cellrangermulti-vdjref` | flag | — | Skip mkvdjref in cellrangermulti (when VDJ data is absent or a prebuilt `--cellranger-vdj-index` is supplied) |\n| `--save-reference` | flag | — | Save the built reference index for future reuse |\n| `--save-align-intermeds` \u002F `--no-save-align-intermeds` | flag | — | Forward `save_align_intermeds: true`\u002F`false`; when neither is given the upstream nf-core\u002Fscrnaseq 4.1.0 default (`true`) is preserved, so intermediate BAMs are published by default — pass `--no-save-align-intermeds` on large runs to save disk |\n| `--expected-cells` | int | — | Override expected cell count for a single-sample samplesheet; multi-sample runs must set `expected_cells` per row. The wrapper enforces `≥1` (stricter than the upstream `integer` schema, which has no minimum) since a non-positive count is meaningless |\n| `--timeout-hours` | float | `12` | Wall-clock cap for the Nextflow run, in hours. Use `0` to disable the cap for long HPC\u002Fcloud runs whose walltime is enforced by the scheduler. Via the ClawBio runner the runner's own timeout also applies |\n| `--work-dir` | string | `\u003Coutput>\u002Fupstream\u002Fwork` | Nextflow work directory. Local paths are resolved before execution; object-store URIs such as `s3:\u002F\u002F...` or `gs:\u002F\u002F...` are passed through for cloud executors |\n| `--allow-conda-cellranger` | flag | — | Allow Cell Ranger presets with conda\u002Fmamba only when a trusted site config supplies Cell Ranger |\n| `--email` | string | — | Email address for pipeline completion notification |\n| `--email-on-fail` | string | — | Email address for pipeline failure notification |\n| `--multiqc-title` | string | — | Custom title for the MultiQC report |\n| `--multiqc-config` | path | — | Custom MultiQC config YAML |\n| `--multiqc-logo` | path | — | Custom MultiQC logo image |\n| `--multiqc-methods-description` | path | — | Custom MultiQC methods-description YAML |\n| `--publish-dir-mode` | enum | — | Forwarded nf-core publish mode: `symlink`, `rellink`, `link`, `copy`, `copyNoFollow`, or `move` |\n| `--trace-report-suffix` | string | — | Suffix for Nextflow trace\u002Freport\u002Ftimeline filenames |\n| `--monochrome-logs` | flag | — | Disable ANSI colors in nf-core logs |\n| `--resume` | flag | — | Nextflow resume (checksum-verified against prior manifest; preset\u002Fprofile\u002Fsource\u002Fwork-dir must match) |\n| `--run-downstream` | flag | — | Opt in to `scrna_orchestrator` handoff after pipeline completion |\n| `--skip-downstream` | flag | — | Force-skip the downstream handoff even if `--run-downstream` is given (handoff is off by default) |\n| `--cellrangerarc-config` | path | — | Config JSON for CellRanger ARC index construction |\n| `--cellrangerarc-reference` | string | — | Reference genome name used inside the CellRanger ARC config |\n| `--motifs` | path | — | Motif file (e.g. JASPAR) for CellRanger ARC |\n| `--cellranger-vdj-index` | path | — | Prebuilt CellRanger VDJ reference |\n| `--gex-frna-probe-set` | path | — | Probe set CSV for FFPE fixed RNA profiling (`cellrangermulti`) |\n| `--gex-target-panel` | path | — | Target panel CSV for targeted GEX (`cellrangermulti`) |\n| `--gex-cmo-set` | path | — | CMO reference CSV for multiplexed samples (`cellrangermulti`) |\n| `--gex-barcode-sample-assignment` | path | — | Barcode-to-sample assignment override CSV (`cellrangermulti`). **Not** an OCM selector — OCM mode is encoded via the `ocm_ids` column of `--cellranger-multi-barcodes` |\n| `--fb-reference` | path | — | Feature-barcode reference CSV for antibody capture (`cellrangermulti`) |\n| `--vdj-inner-enrichment-primers` | path | — | V(D)J cDNA enrichment primer sequences (`cellrangermulti`) |\n| `--cellranger-multi-barcodes` | path | — | Multiplexed sample samplesheet for CMO\u002FFFPE demultiplexing (`cellrangermulti`) |\n\n## Output Structure\n\n```text\noutput_directory\u002F\n├── report.md                         # Wrapper run summary\n├── result.json                       # Structured result payload\n├── check_result.json                 # Written only with --check (preflight-only mode); no upstream\u002F is produced\n├── logs\u002F\n│   ├── stdout.txt                    # Nextflow stdout\n│   └── stderr.txt                    # Nextflow stderr\n├── upstream\u002F\n│   └── results\u002F                      # nf-core\u002Fscrnaseq output tree\n│       ├── fastqc\u002F                   # Per-read FastQC reports\n│       ├── multiqc\u002F                  # MultiQC HTML and data\n│       │   └── multiqc_report.html\n│       ├── pipeline_info\u002F            # Execution report, timeline, trace, DAG\n│       └── \u003Caligner>\u002F                # Aligner-specific outputs\n│           └── mtx_conversions\u002F      # AnnData (.h5ad), SCE (.rds), Seurat (.rds)\n│               │  # Per nf-core\u002Fscrnaseq 4.1.0 conf\u002Fmodules.config, the concatenated\n│               │  # matrices sit at the TOP of mtx_conversions\u002F while each per-sample\n│               │  # matrix is nested one level deeper under \u003Csample>\u002F (MTX_TO_H5AD\u002F\n│               │  # CONCAT_H5AD\u002FANNDATA_BARCODES rewrite non-combined files to\n│               │  # `${meta.id}\u002F${filename}`). The wrapper scans BOTH depths and does\n│               │  # not hard-code filenames: it ranks whatever .h5ad it finds to pick\n│               │  # one preferred_h5ad (combined > per-sample; within a group\n│               │  # cellbender_filter > filtered > plain > raw, matched on the filename\n│               │  # suffix). combined_* filter-suffixed variants are version-dependent.\n│               ├── combined_matrix.h5ad                       # documented concatenated matrix (top level)\n│               ├── combined_filtered_matrix.h5ad              # version-dependent: filtering ran\n│               ├── combined_cellbender_filter_matrix.h5ad     # version-dependent: CellBender ran → top preference\n│               └── \u003Csample>\u002F                                  # per-sample matrices nested one level deeper\n│                   ├── \u003Csample>_raw_matrix.h5ad\n│                   └── \u003Csample>_filtered_matrix.h5ad          # conditional: filtering ran\n├── reproducibility\u002F                  # Reproducibility + provenance bundle (single directory)\n│   ├── samplesheet.valid.csv         # Normalized samplesheet (absolute POSIX paths); named samplesheet.demo.csv with --demo\n│   ├── params.yaml                   # Effective Nextflow parameters\n│   ├── nextflow_configs\u002F             # Written only when -c\u002F--config is used: copies of the supplied config files, replayed by commands.sh\n│   ├── commands.sh                   # Portable replay script\n│   ├── environment.yml               # Conda environment spec (for reference)\n│   ├── checksums.sha256              # SHA-256 for in-bundle artifacts only; `sha256sum -c` passes from output dir\n│   ├── manifest.json                 # Run metadata: preset, profile, versions, checksums\n│   ├── macos_docker.config           # macOS+Docker workarounds (VirtioFS, ARM64, STAR FIFOs)\n│   ├── remap_paths.py                # Helper for replaying on a different machine\n│   ├── compatibility_policy.json     # Copied policy snapshot (resume\u002Fupdate rules)\n│   ├── pinned_versions.json          # Copied pinned-versions snapshot\n│   ├── inputs.json                   # Samplesheet + fastq\u002Freference paths and digests (reference_checksums)\n│   ├── invocation.json               # Timestamp, preset, profile, pipeline version\n│   ├── preflight.json                # Java\u002FNextflow\u002Fbackend info\n│   ├── upstream.json                 # Pipeline source resolution details\n│   ├── outputs.json                  # Detected artifacts\n│   ├── runtime.json                  # Execution timing\n│   └── skill.json                    # Skill name and version\n├── provenance\u002F                       # Written only with --run-downstream\n│   └── handoff.json                  # Downstream orchestrator path + checksum + outcome\n└── scrna_analysis\u002F                   # Written only with --run-downstream: scrna_orchestrator output\n```\n\n## Example Output\n\n`result.json` (abbreviated):\n```json\n{\n  \"skill\": \"scrnaseq-pipeline\",\n  \"version\": \"0.1.0\",\n  \"summary\": {\n    \"preset\": \"star\",\n    \"aligner_effective\": \"star\",\n    \"pipeline_source_kind\": \"remote_repo\",\n    \"pipeline_version_or_commit\": \"4.1.0\",\n    \"profile\": \"docker\",\n    \"preferred_h5ad\": \"\u003Coutput>\u002Fupstream\u002Fresults\u002Fstar\u002Fmtx_conversions\u002Fcombined_filtered_matrix.h5ad\",\n    \"handoff_available\": true,\n    \"samples_detected\": 2,\n    \"cellbender_used\": false\n  }\n}\n```\n\n`report.md` closes with:\n```\n## Next Steps\n- python clawbio.py run scrna --input \u003Cpreferred_h5ad> --output \u003Cdir>\n- python clawbio.py run scrna-embedding --input \u003Cpreferred_h5ad> --output \u003Cdir>\n```\n\n## Gotchas\n\n- **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_code` and a `fix` hint. Nextflow ≥25.04.0 is required.\n- **Conda\u002FMamba profiles need network access at runtime.** Preflight only verifies the `conda`\u002F`mamba` binary exists — it deliberately does not probe network connectivity (a flaky check that would also reject valid offline caches). With `-profile conda`, Nextflow resolves environments from bioconda\u002Fconda-forge at runtime, so an offline or proxied host can make a task fail mid-run with a confusing resolver error. Cell Ranger presets are rejected with conda\u002Fmamba by default because Cell Ranger is not distributed via bioconda; use `--allow-conda-cellranger` only when a trusted site config provides Cell Ranger. For fully offline\u002Freproducible execution prefer `docker`\u002F`singularity` (pinned containers), or pre-warm the conda package cache before running.\n- **`--genome` conflicts with any explicit genome-reference flag.** Providing `--genome` alongside `--fasta`, `--gtf`, `--transcript-fasta`, `--txp2gene`, or any prebuilt index raises `CONFLICTING_REFERENCES` in preflight. Use either `--genome \u003Cshortcut>` or explicit genome flags — never both. Auxiliary files (barcode whitelist, CMO\u002Fprobe\u002Ffeature sets, primers, multi-barcode samplesheets) are **not** genome references and are compatible with `--genome`.\n- **`igenomes_ignore` is set automatically.** Whenever an explicit **genome** reference (`fasta`, `gtf`, `transcript_fasta`, `txp2gene`, or any prebuilt index) is provided, the wrapper writes `igenomes_ignore: true` to suppress nf-schema DNS validation of the default iGenomes S3 URL. Auxiliary files never trigger it. You do not need to set this manually. Use `--igenomes-base` only for local iGenomes mirrors.\n- **Protocol compatibility is enforced before Nextflow starts.** `standard`, `star`, and `kallisto` require an explicit `--protocol`, because nf-core\u002Fscrnaseq 4.1.0 documents `auto` as CellRanger-only. Explicit `auto` is rejected for those presets. `smartseq` denotes **Smart-seq3** and is accepted for `star` and `kallisto` only; **`smartseq2` is rejected for every preset** because nf-core\u002Fscrnaseq 4.1.0 does not support Smart-seq2. `cellranger` accepts only `auto` and `10XV1`-`10XV4`; `cellrangerarc` accepts only `auto`; `cellrangermulti` is samplesheet-driven. Unknown custom protocol strings are passed through only for `standard`, `star`, and `kallisto`, where nf-core documents custom values.\n- **`save_align_intermeds` defaults to ON in 4.1.0.** Upstream nf-core\u002Fscrnaseq 4.1.0 sets `save_align_intermeds: true` by default, so aligner intermediate BAMs are published into the results tree unless you pass `--no-save-align-intermeds`. On real (non-`--demo`) datasets these intermediates can be tens to hundreds of GB; disable them when you only need the count matrices.\n- **Deprecated upstream parameters:** `skip_emptydrops` is deprecated in nf-core\u002Fscrnaseq 4.1.0. The wrapper accepts `--skip-emptydrops` only as a compatibility alias and emits `skip_cellbender: true`.\n- **`--demo` forces preset=star and skip_cellbender=true.** The nf-core upstream `test` profile 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. **`--demo` also requires network access**: the test profile fetches its FASTQs and references from remote GitHub URLs (nf-core's design — no local test data is bundled), so on an offline\u002Fsandboxed host set `NXF_OFFLINE` and the wrapper fails fast at preflight with `DEMO_REQUIRES_NETWORK` instead of a cryptic Nextflow `does not exist` abort. This does not violate local-first (which governs your *genetic data* — never uploaded); `--demo` only *downloads* nf-core's public test data. For a fully offline run, use your own local `--input` and references.\n- **`--demo` is fully hermetic — every pipeline flag is ignored.** The `test` profile owns the entire pipeline configuration: input, references, protocol, and all QC\u002Fskip\u002Ftuning\u002Fsave\u002Freporting knobs. Because a `-params-file` value overrides profile config in Nextflow, the wrapper writes **only** the four forced essentials into `params.yaml` in demo mode — `outdir`, `aligner` (`star`), `igenomes_ignore`, and `skip_cellbender` — and nothing else. Any other flag you pass with `--demo` (e.g. `--genome`, `--fasta`, an index, `--igenomes-base`, `--protocol`, `--star-feature`, `--skip-fastqc`, `--save-reference`, `--seq-center`, `--publish-dir-mode`, …) is ignored and listed in a WARNING. Demo output validation likewise requires FastQC and MultiQC regardless of any `--skip-*` you pass, since those flags are not written. Drop `--demo` to run on your own inputs.\n- **The Nextflow run has a 12 h wall-clock cap by default.** Large multi-sample STARsolo\u002FCellRanger runs on full genomes can exceed this; raise it with `--timeout-hours \u003Cn>` or pass `--timeout-hours 0` to disable the cap entirely (recommended on HPC\u002Fcloud where the scheduler enforces walltime). When the run targets an object-store work directory (`--work-dir s3:\u002F\u002F…`\u002F`gs:\u002F\u002F…`) or an institutional\u002Fsite profile while the cap is still active, preflight prints a WARNING reminding you to pass `--timeout-hours 0`, since the scheduler — not the wrapper — should bound such runs. When neither the cap fires nor the job is killed, behaviour is unchanged.\n- **Required outputs are checked after Nextflow exits.** The wrapper expects `pipeline_info\u002F`, the effective aligner directory, MultiQC unless `--skip-multiqc`, FastQC HTML\u002FZIP reports unless `--skip-fastqc`, and at least one `.h5ad` matrix. FastQC is a hard requirement for **every** aligner — including the Cell Ranger family (`cellranger`\u002F`cellrangerarc`\u002F`cellrangermulti`) — because nf-core\u002Fscrnaseq 4.1.0 runs FASTQC on the shared input-read channel (`ch_fastq`) *before* any aligner-specific branching and publishes `fastqc\u002F` for all of them (the output docs state \"FastQC is applied to all aligners' input reads\"). A missing `fastqc\u002F` tree on a non-skipped run is therefore a genuine failure, not a tolerated gap. All six presets run the pipeline's `MTX_TO_H5AD` conversion (CellRanger ARC\u002FMulti reuse the CellRanger template), so a completed run with **zero `.h5ad` is treated as a failure** (`EXPECTED_OUTPUTS_NOT_FOUND`) rather than a silent success. A present-but-ambiguous selection (e.g. several per-sample matrices, no combined) does not fail the run; it is signalled by `handoff_available = false`, and `--run-downstream` prints a warning instead of silently returning.\n- **`preferred_h5ad` may be absent.** If no combined matrix is produced and there are multiple per-sample files, `handoff_available` is `false`. Always check `result.json` before chaining to `scrna-orchestrator` or `scrna-embedding`.\n- **No arbitrary Nextflow parameter passthrough.** Pipeline *parameters* flow only through the preset system and `params.yaml`; no custom `--param` flags can be injected. Validated `-c\u002F--config` files are allowed for infrastructure\u002FHPC configuration and are copied into the reproducibility bundle. Note this is a **trust boundary, not a sandbox**: a Nextflow config is executable Groovy (it can set `process.beforeScript`, `process.shell`, etc.), so a `-c` file is as trusted as code you run yourself. The wrapper validates that each config exists and lints it for `params.*` overrides (see the next gotcha), but otherwise does not sandbox its contents — only pass configs you authored or trust.\n- **The work directory defaults to `\u003Coutput>\u002Fupstream\u002Fwork`.** This preserves local resume and bundle portability for workstation\u002FHPC runs. Managed cloud-batch executors that need an object-store work directory can pass `--work-dir s3:\u002F\u002F...` or `--work-dir gs:\u002F\u002F...`; the value is recorded in provenance and replayed by `commands.sh`. Local custom paths are resolved before execution and are less portable than the default.\n- **The published results directory (`outdir`) is intentionally the local `\u003Coutput>\u002Fupstream\u002Fresults`.** This is a wrapper policy, not an nf-core limitation: the wrapper parses the results tree to detect the `preferred_h5ad`, MultiQC, and `pipeline_info\u002F`, and to hand off downstream, so results must land on the local filesystem. This is still compatible with cloud-batch executors — the work directory may be remote (`--work-dir s3:\u002F\u002F...`) while Nextflow copies the published results back to the local `outdir`. There is no `--outdir` override to an object store, because the wrapper could not then parse outputs or chain downstream; for a remote-published run, invoke the upstream pipeline directly. The `--output` directory must also be **outside** the ClawBio source tree — an output inside the repository is rejected at preflight with `OUTPUT_DIR_INSIDE_REPO` (parity with nfcore-rnaseq\u002Fnfcore-sarek) so multi-gigabyte pipeline artifacts never pollute the checkout.\n- **`--pipeline-version` is pinned to the 4.1.0 contract.** The wrapper's parameter set, protocol matrix and output validation are written for nf-core\u002Fscrnaseq 4.1.0, so a different `--pipeline-version` is rejected unless you pass `--allow-pipeline-version-override` (a warned, provenance-recorded opt-in; validations stay 4.1.0).\n- **`-c\u002F--config` files may not set `params.*`.** nf-core advises against setting parameters via `-c`. The wrapper blocks any config that assigns parameters outside the audited `params.yaml` — dotted (`params.aligner = …`), bracket (`params['aligner'] = …`), whole-map (`params = […]`), or a `params { … }` block (including the `{` on the next line). Pass `--trust-config-params` to allow it (detected overrides are recorded in provenance). Note the config is still trusted Groovy and is not sandboxed; this lint only guarantees `params.yaml` stays the single parameter source.\n- **`--resume` enforces strict compatibility.** The wrapper checks that the stored manifest matches the current preset, profile, pipeline source, effective `params.yaml` checksum, and Nextflow work directory. Mismatches raise `INVALID_RESUME_STATE`.\n- **RNA velocity requires coordinated flags and is validated in preflight.** For STARsolo: `--star-feature \"Gene Velocyto\"` requires `--star-ignore-sjdbgtf`. For Kallisto `--kb-workflow lamanno`\u002F`nac`: when the index is built from `--fasta`\u002F`--gtf`, `kb ref` generates the capture files, so `--kb-t1c`\u002F`--kb-t2c` are **not** required (matching the documented fasta+gtf example); they are required only alongside a prebuilt `--kallisto-index`, and supplying exactly one of the two is always rejected. Invalid combinations raise `INVALID_PRESET_CONFIGURATION` before Nextflow starts.\n- **`cellrangerarc` config and reference are paired.** Providing `--cellrangerarc-config` without `--cellrangerarc-reference` (or vice versa) raises `INVALID_PRESET_CONFIGURATION`. `--motifs` is optional and independent.\n- **`cellrangermulti` validates documented preflight constraints.** `feature_type=ab` **or** `feature_type=crispr` requires `--fb-reference` (in nf-core\u002Fscrnaseq 4.1.0 both Antibody Capture and CRISPR Guide Capture share the single `fb_reference` feature reference — there is no separate CRISPR reference param, so a crispr run without it has no feature reference and fails inside Cell Ranger); `feature_type=vdj` with `--skip-cellrangermulti-vdjref` requires `--cellranger-vdj-index`; `--gex-frna-probe-set` (FFPE) requires `--cellranger-multi-barcodes`; `feature_type=cmo` (CMO multiplexing) also requires `--cellranger-multi-barcodes`. The three multiplexing modes nf-core documents as mutually exclusive are encoded **per multiplexed sample** in the `--cellranger-multi-barcodes` samplesheet via the `probe_barcode_ids` (**FFPE**), `cmo_ids` (**CMO**) and `ocm_ids` (**OCM**) columns. The wrapper parses that samplesheet and rejects any physical `sample` that populates more than one of those columns (`INVALID_PRESET_CONFIGURATION`, with `conflicting_modes`). It additionally rejects the run-level FFPE↔CMO flag combination (`--gex-frna-probe-set` with `feature_type=cmo`\u002F`--gex-cmo-set`). Note `--gex-barcode-sample-assignment` is a cell\u002Ftag-calling override, **not** an OCM selector, so it is never treated as a mode. `cellrangermulti` FASTQ filenames are **not** validated by the wrapper (unlike `cellranger`\u002F`cellrangerarc`): Cell Ranger Multi maps libraries through its own multi samplesheet and `[libraries]` config, so the per-file 10x naming is left to Cell Ranger to validate.\n- **FASTA schema validation.** The FASTA path must match `^\\S+\\.fn?a(sta)?(\\.gz)?$` (the nf-core\u002Fscrnaseq 4.1.0 schema). Paths with whitespace or non-standard extensions are rejected in preflight.\n- **Local checkout must be a sibling directory.** The wrapper looks for `..\u002Fscrnaseq` relative to the ClawBio repo root. If the checkout path contains whitespace (common on macOS), the wrapper warns and falls back to the remote pipeline. Ensure `ClawBio\u002F` and `scrnaseq\u002F` share the same parent folder.\n- **Local checkout version is verified.** A sibling checkout is used only when its exact git tag matches `--pipeline-version` or its commit equals `--pipeline-version`. Git-less or unverifiable local directories fall back to the remote pinned pipeline.\n- **The `validation.*` \u002F `validationSchemaIgnoreParams` warnings on a run or a bundle replay come from the pipeline, not from the wrapper. Do NOT try to silence them by adding params.** nf-core\u002Fscrnaseq 4.1.0's own `nextflow.config` declares `plugins { id 'nf-schema@2.5.1' }` and a matching `validation { defaultIgnoreParams = [\"genomes\"]; monochromeLogs = params.monochrome_logs }` scope, and it carries a `monochromeLogs = null` param that upstream itself annotates `\u002F\u002F TODO temporary workaround a warning` (with a matching ignored lint check in its `.nf-core.yml`). nf-schema surfaces that as `WARN: The following invalid input values have been detected: * --validationSchemaIgnoreParams: genomes`. The wrapper writes **none** of these keys — its `params.yaml` carries only the audited CLI surface — and the bundle's `commands.sh` runs the pinned pipeline unmodified, so the same warning appears on a plain upstream `nextflow run nf-core\u002Fscrnaseq -r 4.1.0` too. It is harmless upstream noise: the plugin loads correctly (`Plugins declared=[nf-schema@2.5.1]`) and validation still runs. Writing `validation`\u002F`monochromeLogs` into `params.yaml` to quiet it would override the pipeline's own config and is exactly the wrong fix — the wrapper's \"omit = trust upstream default\" rule applies. A regression test pins that these keys never enter `params.yaml`.\n- **macOS Docker workaround is applied automatically.** On macOS with Docker, `macos_docker.config` is written to the reproducibility bundle and passed to Nextflow. It sets `stageInMode = \"copy\"` (avoids VirtioFS EDEADLK), `--platform linux\u002Famd64` (Rosetta emulation), and routes STAR `_STARtmp` to the container's `\u002Ftmp` (avoids VirtioFS FIFO limitation). These three workarounds apply to **every** macOS+Docker run. A `resourceLimits` block (`cpus 4, memory 15.GB`) is written **only for `--demo` runs**, with `time` raised to `4.h` (the upstream `conf\u002Ftest.config` caps tasks at `1.h`, too short for STAR genome generation under Apple-Silicon emulation). These ceilings are test-machine sized and are never applied to real datasets (a human STAR index needs far more than 15 GB). One consequence: a `--demo` run is capped at `4.h` on macOS+Docker but at the upstream `1.h` on Linux. **On non-macOS docker, a real (non-demo) run instead writes a host-scaled `process.resourceLimits` config** (physical RAM minus headroom, bounded by the Docker `MemTotal` when known) so the local executor does not abort with `Process requirement exceeds available memory` when a process's production request — e.g. STARsolo's index build — exceeds this machine. This follows nf-core's resourceLimits guidance (limits should match the machine maximum) and carries no 15 GB ceiling. It is written to `reproducibility\u002Fresource_limits.config` and shipped in the bundle; `commands.sh` re-applies it on non-macOS replay hosts so a from-scratch reproduction on the generating machine does not re-abort on memory. Override with your own `-c process { resourceLimits = [...] }` if needed. Output directories under `\u002Ftmp` emit a WARNING — use a path under HOME.\n\n## Safety\n\n- **Local-first by default**: user FASTQs\u002Freferences and outputs stay on the local filesystem. Remote input\u002Freference URIs are rejected (`REMOTE_INPUT_NOT_ALLOWED`) unless `--allow-remote-inputs` is explicitly passed, which also logs a runtime warning naming every path fetched over the network. `--allow-remote-inputs` relaxes only the wrapper's own preflight check: remote FASTQ\u002Freference URIs are then written into the normalized samplesheet\u002F`params.yaml` **verbatim** and staged natively by Nextflow at run time. The wrapper does not download them itself, so remote inputs require outbound network access and are incompatible with `NXF_OFFLINE` — under offline mode Nextflow's own file-existence validation (nf-schema) still runs and will fail on the remote paths.\n- **Strict preflight**: Nextflow is never invoked if validation fails.\n- **No hallucinated outputs**: Only artifacts confirmed on disk are reported.\n- **Disclaimer**: Every report includes the ClawBio medical disclaimer.\n\n## Reproducibility Scope\n\nThe bundle guarantees **configuration- and provenance-level** reproducibility, not bit-for-bit identical scientific results. Be explicit about the boundary:\n\n**Guaranteed (captured in the bundle):**\n- Pipeline pinned by `-r \u003Cversion>` (or a git-verified local checkout commit).\n- Nextflow engine pinned via `export NXF_VER=\u003Cversion>` in `commands.sh`.\n- Effective `params.yaml` + SHA-256; `--resume` rejects a mismatched params checksum.\n- `checksums.sha256` (relative labels — `sha256sum -c` passes after the bundle is copied to any folder), reference-file digests in `inputs.json`, and a portable self-anchoring `commands.sh` + `remap_paths.py`. Because `commands.sh` self-anchors and `params.yaml` stores output-relative paths, **relocating the output directory needs no rewrite** — unlike the rnaseq\u002Fsarek bundles you do not pass `remap_paths.py --output-dir`; it is accepted for CLI parity and simply confirms this. Use `remap_paths.py --old\u002F--new` and `--refs-old\u002F--refs-new` only when the FASTQ\u002Freference paths themselves move.\n\n**NOT guaranteed (outside the wrapper's control):**\n- **Bit-for-bit identical outputs.** Aligner thread-count can reorder records, and **CellBender is stochastic** (random-seed driven), so the same inputs+versions may not yield byte-identical `.h5ad`.\n- **Container immutability.** Images are pinned by the tag nf-core ships, not by an immutable digest; a re-published tag could change the binaries.\n- **`conda`\u002F`mamba` is not offline-reproducible** — environments resolve from channels at run time (prefer `docker`\u002F`singularity`).\n- **External reference bytes are not bundled** — `--genome` pulls from iGenomes S3; local refs are checksummed for provenance but not copied into the bundle.\n\nTo approach bit-level reproduction: use `docker`\u002F`singularity` (not conda), pin container digests, fix tool seeds where the pipeline allows, and archive the exact reference files alongside the bundle.\n\n## Agent Boundary\n\nThe agent dispatches and explains; this skill executes.\n\n**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.\n\n**Skill**: Validate environment and inputs, run the pipeline with controlled parameters, write all provenance and reproducibility artifacts, and report the detected `preferred_h5ad`.\n\n## Chaining Partners\n\n| Skill | When to chain |\n|-------|--------------|\n| `scrna-orchestrator` | After a successful run, pass `preferred_h5ad` for clustering, QC, and markers |\n| `scrna-embedding` | Pass `preferred_h5ad` for scVI\u002FscANVI batch integration and latent embeddings |\n| `multiqc-reporter` | Re-aggregate QC across multiple wrapper runs |\n\n## Maintenance\n\n**Review cadence**: After each nf-core\u002Fscrnaseq major release. Check `NEXTFLOW_MIN_VERSION` (`schemas.py`), `SUPPORTED_PRESETS`, `SUPPORTED_PROFILES`, and this SKILL.md for accuracy.\n\n**Staleness signals**:\n- Preflight rejects a Nextflow version that the current pipeline supports → update `NEXTFLOW_MIN_VERSION` in `schemas.py` and `reproducibility\u002Fpinned_versions.json`.\n- New aligners appear upstream but are absent from `PRESET_ALIGNERS` → add to `schemas.py` and update tests.\n- New reference\u002Findex inputs appear upstream → add them to `GENOME_REFERENCE_FIELDS` or `AUXILIARY_PATH_FIELDS` in `schemas.py` (the single source both `params_builder` and `preflight` consume). Never re-introduce per-module copies.\n- The pinned `STAR_ALIGN_BASE_EXT_ARGS` in `nfcore_4_1_0_contract.py` drifts from `conf\u002Fmodules.config` → `test_pinned_star_args_match_sibling_checkout_if_present` fails when a sibling checkout is present; update the constant to match.\n- The VirtioFS macOS workaround (`stageInMode = \"copy\"`) is only necessary while Apple Silicon runs Docker via QEMU. Remove `build_macos_docker_config` \u002F `write_macos_docker_config` when a native arm64 Docker runtime eliminates VirtioFS deadlocks.\n\n**Deprecation criteria**: Deprecate if nf-core\u002Fscrnaseq releases a Python SDK with equivalent preflight, params, and provenance APIs.\n\n## Citations\n\n- [nf-core\u002Fscrnaseq 4.1.0](https:\u002F\u002Fnf-co.re\u002Fscrnaseq\u002F4.1.0)\n- [nf-core\u002Fscrnaseq usage](https:\u002F\u002Fnf-co.re\u002Fscrnaseq\u002F4.1.0\u002Fdocs\u002Fusage\u002F)\n- [nf-core\u002Fscrnaseq parameters](https:\u002F\u002Fnf-co.re\u002Fscrnaseq\u002F4.1.0\u002Fparameters\u002F)\n- [nf-core\u002Fscrnaseq output](https:\u002F\u002Fnf-co.re\u002Fscrnaseq\u002F4.1.0\u002Fdocs\u002Foutput\u002F)\n- [Nextflow](https:\u002F\u002Fwww.nextflow.io\u002F)\n- [Alevin-fry \u002F Simpleaf](https:\u002F\u002Fsimpleaf.readthedocs.io\u002F)\n- [STARsolo](https:\u002F\u002Fgithub.com\u002Falexdobin\u002FSTAR\u002Fblob\u002Fmaster\u002Fdocs\u002FSTARsolo.md)\n- [kb-python \u002F BUStools](https:\u002F\u002Fwww.kallistobus.tools\u002F)\n",{"name":5,"license":15,"metadata":24,"description":7},{"tags":25,"author":34,"domain":35,"inputs":36,"outputs":44,"version":55,"openclaw":56,"demo_data":81,"endpoints":85,"dependencies":87},[26,27,28,29,30,31,32,33],"scrna","single-cell","nextflow","nf-core","fastq","10x","h5ad","preprocessing","ClawBio","transcriptomics",[37],{"name":38,"type":39,"format":40,"required":42,"description":43},"samplesheet","file",[41],"csv",true,"nf-core\u002Fscrnaseq samplesheet CSV with required columns: sample, fastq_1, fastq_2",[45,50],{"name":46,"type":39,"format":47,"description":49},"report",[48],"md","Wrapper run summary and downstream handoff recommendations",{"name":51,"type":39,"format":52,"description":54},"result",[53],"json","Structured result payload with detected outputs and provenance","0.1.0",{"os":57,"emoji":60,"always":20,"homepage":61,"requires":62,"trigger_keywords":66},[58,59],"darwin","linux","🧫","https:\u002F\u002Fgithub.com\u002FClawBio\u002FClawBio",{"bins":63},[64,28,65],"python3","java",[67,68,69,70,71,72,73,74,75,76,77,78,79,80],"scrnaseq","nf-core scrnaseq","run scrnaseq from fastq","preprocess 10x fastqs","generate h5ad from single-cell fastq","single-cell preprocessing","nextflow scrna pipeline","10x chromium fastq pipeline","starsolo upstream processing","alevin-fry fastq to counts","run nextflow scrnaseq","upstream single-cell pipeline","fastq to h5ad single cell","10x genomics fastq pipeline",[82],{"path":83,"description":84},"demo\u002FREADME.md","Demo mode uses the upstream nf-core\u002Fscrnaseq -profile test dataset rather than bundled FASTQs",{"cli":86},"python clawbio.py run scrnaseq-pipeline --input {samplesheet} --output {output_dir}",{"python":88,"packages":89},">=3.11",[90],"pyyaml","master","49e49abf2f670d429e0b7e2c0349739c3fdd5cbe","skills\u002Fnfcore-scrnaseq-wrapper",5,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium","https:\u002F\u002Fgithub.com\u002Fstanfish06","https:\u002F\u002Fwww.stanfish.dev\u002F","2026-11-14 21:31:37",{"source":8,"skillName":5,"commands":100,"prompt":110,"zipAvailable":42},[101,104,107],{"tool":102,"command":103},"npx","npx skills add stanfish06\u002Fskillquarium --skill nfcore-scrnaseq-wrapper",{"tool":105,"command":106},"bunx","bunx skills add stanfish06\u002Fskillquarium --skill nfcore-scrnaseq-wrapper",{"tool":108,"command":109},"pnpm","pnpm dlx skills add stanfish06\u002Fskillquarium --skill nfcore-scrnaseq-wrapper","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002FSKILL.md",[112,118,124,128,131,135,139,143,147,151,155,159,163,167,171,175,179,183,187,191,195,199,203,207,211,215,219,223,227,231,235,239,243,247,251,255,259,263,267,271,275,279,283,287,291,295],{"path":113,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":116,"sourceHtmlUrl":117},"_isolated_imports.py","SCRIPT","脚本",1266,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002F_isolated_imports.py",{"path":119,"resourceType":120,"resourceTypeDesc":121,"sizeBytes":122,"sourceHtmlUrl":123},"CHANGELOG.md","REFERENCE","参考文档",24274,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002FCHANGELOG.md",{"path":125,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":126,"sourceHtmlUrl":127},"command_builder.py",1849,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Fcommand_builder.py",{"path":83,"resourceType":120,"resourceTypeDesc":121,"sizeBytes":129,"sourceHtmlUrl":130},320,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Fdemo\u002FREADME.md",{"path":132,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":133,"sourceHtmlUrl":134},"errors.py",3415,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ferrors.py",{"path":136,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":137,"sourceHtmlUrl":138},"executor.py",10312,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Fexecutor.py",{"path":140,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":141,"sourceHtmlUrl":142},"nfcore_4_1_0_contract.py",13062,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_4_1_0_contract.py",{"path":144,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":145,"sourceHtmlUrl":146},"nfcore_scrnaseq_wrapper.py",50865,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Fnfcore_scrnaseq_wrapper.py",{"path":148,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":149,"sourceHtmlUrl":150},"outputs_parser.py",16735,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Foutputs_parser.py",{"path":152,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":153,"sourceHtmlUrl":154},"params_builder.py",12009,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Fparams_builder.py",{"path":156,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":157,"sourceHtmlUrl":158},"pipeline_source.py",7165,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Fpipeline_source.py",{"path":160,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":161,"sourceHtmlUrl":162},"preflight.py",66735,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Fpreflight.py",{"path":164,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":165,"sourceHtmlUrl":166},"provenance.py",14707,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Fprovenance.py",{"path":168,"resourceType":120,"resourceTypeDesc":121,"sizeBytes":169,"sourceHtmlUrl":170},"README.md",5894,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002FREADME.md",{"path":172,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":173,"sourceHtmlUrl":174},"remap_paths.py",27874,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Fremap_paths.py",{"path":176,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":177,"sourceHtmlUrl":178},"reporting.py",13537,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Freporting.py",{"path":180,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":181,"sourceHtmlUrl":182},"repro_commands.py",12843,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Frepro_commands.py",{"path":184,"resourceType":120,"resourceTypeDesc":121,"sizeBytes":185,"sourceHtmlUrl":186},"reproducibility\u002Fcompatibility_policy.json",2066,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Freproducibility\u002Fcompatibility_policy.json",{"path":188,"resourceType":120,"resourceTypeDesc":121,"sizeBytes":189,"sourceHtmlUrl":190},"reproducibility\u002Fpinned_versions.json",775,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Freproducibility\u002Fpinned_versions.json",{"path":192,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":193,"sourceHtmlUrl":194},"samplesheet_builder.py",32704,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Fsamplesheet_builder.py",{"path":196,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":197,"sourceHtmlUrl":198},"schemas.py",5878,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Fschemas.py",{"path":200,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":201,"sourceHtmlUrl":202},"tests\u002Fconftest.py",4134,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Fconftest.py",{"path":204,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":205,"sourceHtmlUrl":206},"tests\u002Ftest_audit_fixes.py",25290,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_audit_fixes.py",{"path":208,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":209,"sourceHtmlUrl":210},"tests\u002Ftest_audit_round2.py",26960,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_audit_round2.py",{"path":212,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":213,"sourceHtmlUrl":214},"tests\u002Ftest_audit_round3.py",17642,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_audit_round3.py",{"path":216,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":217,"sourceHtmlUrl":218},"tests\u002Ftest_audit_round4.py",12356,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_audit_round4.py",{"path":220,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":221,"sourceHtmlUrl":222},"tests\u002Ftest_audit_round5.py",15841,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_audit_round5.py",{"path":224,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":225,"sourceHtmlUrl":226},"tests\u002Ftest_bundle_portability.py",10680,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_bundle_portability.py",{"path":228,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":229,"sourceHtmlUrl":230},"tests\u002Ftest_cli_direct_invocation.py",1474,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_cli_direct_invocation.py",{"path":232,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":233,"sourceHtmlUrl":234},"tests\u002Ftest_command_builder.py",4197,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_command_builder.py",{"path":236,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":237,"sourceHtmlUrl":238},"tests\u002Ftest_contract_generator.py",2824,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_contract_generator.py",{"path":240,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":241,"sourceHtmlUrl":242},"tests\u002Ftest_error_codes.py",2520,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_error_codes.py",{"path":244,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":245,"sourceHtmlUrl":246},"tests\u002Ftest_executor.py",11062,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_executor.py",{"path":248,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":249,"sourceHtmlUrl":250},"tests\u002Ftest_nfcore_contract.py",5143,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_nfcore_contract.py",{"path":252,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":253,"sourceHtmlUrl":254},"tests\u002Ftest_nfcore_scrnaseq_wrapper.py",22693,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_nfcore_scrnaseq_wrapper.py",{"path":256,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":257,"sourceHtmlUrl":258},"tests\u002Ftest_outputs_parser.py",14747,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_outputs_parser.py",{"path":260,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":261,"sourceHtmlUrl":262},"tests\u002Ftest_params_builder.py",17061,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_params_builder.py",{"path":264,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":265,"sourceHtmlUrl":266},"tests\u002Ftest_pipeline_source.py",6785,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_pipeline_source.py",{"path":268,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":269,"sourceHtmlUrl":270},"tests\u002Ftest_portability_remap_interpreter.py",1666,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_portability_remap_interpreter.py",{"path":272,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":273,"sourceHtmlUrl":274},"tests\u002Ftest_preflight.py",29758,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_preflight.py",{"path":276,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":277,"sourceHtmlUrl":278},"tests\u002Ftest_provenance.py",9147,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_provenance.py",{"path":280,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":281,"sourceHtmlUrl":282},"tests\u002Ftest_remap_paths.py",23095,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_remap_paths.py",{"path":284,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":285,"sourceHtmlUrl":286},"tests\u002Ftest_reporting.py",13257,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_reporting.py",{"path":288,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":289,"sourceHtmlUrl":290},"tests\u002Ftest_repro_commands.py",4028,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_repro_commands.py",{"path":292,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":293,"sourceHtmlUrl":294},"tests\u002Ftest_resume_policy.py",8387,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_resume_policy.py",{"path":296,"resourceType":114,"resourceTypeDesc":115,"sizeBytes":297,"sourceHtmlUrl":298},"tests\u002Ftest_samplesheet_builder.py",17456,"https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fnfcore-scrnaseq-wrapper\u002Ftests\u002Ftest_samplesheet_builder.py",[300,307,316,323,330,337],{"skillNo":301,"name":302,"nameZh":6,"description":303,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":304,"categories":305,"keywords":306,"publishedAt":19},"01M76ZJTRVA456GD7K8Y3EP82H","zarr-python","Stores and queries chunked N-D scientific arrays with Zarr-Python 3, including codecs, sharding, S3\u002FGCS storage, and NumPy\u002FDask\u002FXarray integration. Use for array layout, bounded I\u002FO, format migration, or scientific metadata preservation.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":308,"name":309,"nameZh":6,"description":310,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":311,"licenseFileUrl":312,"sourceHtmlUrl":313,"categories":314,"keywords":315,"publishedAt":19},"01M76ZJQZ15Q1HKC5V85NHE325","yeet","Publish local changes to GitHub by confirming scope, committing intentionally, pushing the branch, and opening a draft PR through the GitHub app from this plugin, with `gh` used only as a fallback where connector coverage is insufficient.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fyeet\u002FSKILL.md",[],[],{"skillNo":317,"name":318,"nameZh":6,"description":319,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":311,"licenseFileUrl":6,"sourceHtmlUrl":320,"categories":321,"keywords":322,"publishedAt":19},"01M76ZJ8ASZ4QYQ70Y6SBA4Z4S","xarray","N-dimensional labeled arrays and datasets in Python. Built on top of NumPy and Dask. It introduces labels in the form of dimensions, coordinates, and attributes on top of raw NumPy-like arrays, making data analysis in physical sciences more intuitive and less error-prone. Use for working with multi-dimensional scientific data, NetCDF\u002FGRIB\u002FZarr files, climate\u002Fweather\u002Foceanographic datasets, remote sensing, geospatial imaging, large out-of-memory datasets with Dask, and labeled array operations.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fxarray\u002FSKILL.md",[],[],{"skillNo":324,"name":325,"nameZh":6,"description":326,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":327,"categories":328,"keywords":329,"publishedAt":19},"01M76ZHFBXD6VXPQ02VCEG202B","writing-mstest-tests","Use when asked to fix, rewrite, update, improve, modernize, show corrected code for, or explain existing MSTest tests or MSTest-specific configuration. Use for \"review\" when corrected code or edits are wanted, even for one pasted assertion or passing tests with bad failure output. Covers expected\u002Factual labels; generic Boolean, collection, string, numeric, null, identity, exception, hard-cast, and object[] checks; TestContext\u002Flifecycle; timeout\u002Fcancellation; OS\u002FCI conditions, retry, cleanup, parallelization, MSTest.Sdk project setup, and MSTESTxxxx. Honor the installed MSTest version. DO NOT USE to design new test cases (code-testing), perform report-only audits, create project files rather than explain MSTest setup, run tests, migrate frameworks, or handle non-MSTest\u002Fnon-.NET code.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwriting-mstest-tests\u002FSKILL.md",[],[],{"skillNo":331,"name":332,"nameZh":6,"description":333,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":334,"categories":335,"keywords":336,"publishedAt":19},"01M76ZDFDF4N88RH6HSYGS7GP2","wgs-prs","End-to-end WGS to polygenic risk score pipeline. Takes paired-end FASTQ files (or a pre-existing VCF) through nf-core\u002Fsarek for variant calling, applies VCF QC (normalisation, hard filtering, Ti\u002FTv and Het\u002FHom checks), then computes polygenic risk scores via the PGS Catalog. Fills the FASTQ to VCF gap upstream of the gwas-prs skill.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwgs-prs\u002FSKILL.md",[],[],{"skillNo":338,"name":339,"nameZh":6,"description":340,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":311,"licenseFileUrl":341,"sourceHtmlUrl":342,"categories":343,"keywords":344,"publishedAt":19},"01M76ZCC1SC68J42QK4MDC8RCG","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fstanfish06\u002Fskillquarium\u002Fblob\u002Fmaster\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[],[]]