{"id":7284,"plugin_id":"Plugin_271fcfe114788191b30908b85bd9ade6","kind":"skill","collection_source":null,"comparison_source":null,"observed_at":"2026-09-30T22:50:15.139Z","digest":"c25e5eb1cf2ced56339ff6e7e6a077768af11f27a854263531010eb8f75dcb8f","against":null,"payload":{"name":"ngs-scrna-seq","description":"Route single-cell or single-nucleus RNA-seq FASTQs to public count-generation workflows and defer post-count matrix QC, annotation, clustering, and UMAP analysis to the embedded scrna-seq-qc skill.","included_files":[{"relative_path":"agents/openai.yaml","size_in_bytes":285}],"skill_md_contents":"---\nname: ngs-scrna-seq\ndescription: Route single-cell or single-nucleus RNA-seq FASTQs to public count-generation workflows and defer post-count matrix QC, annotation, clustering, and UMAP analysis to the embedded scrna-seq-qc skill.\n---\n\n# Single-cell RNA-seq\n\nUse this skill for scRNA-seq or snRNA-seq kickoff from FASTQs, Cell Ranger-style outputs, matrices, `.h5`, `.h5ad`, or `.rds`. This skill owns upstream intake and FASTQ-to-count routing; post-count QC, annotation, clustering, and UMAPs must route to the embedded `scrna-seq-qc` skill.\n\n## Essential Inputs\n\nConfirm:\n\n- input type: FASTQ, count matrix, `.h5`, `.h5ad`, or `.rds`\n- assay: single-cell or single-nucleus\n- chemistry or barcode/UMI layout\n- organism and reference\n- expected cells per sample when available\n- sample, donor, batch, and channel metadata\n- desired endpoint: count matrix only, QC, clustering, annotation, UMAP, or differential abundance/expression\n\n## Public Default\n\nFor FASTQs, prefer public alternatives:\n\n- `nf-core/scrnaseq`\n- STARsolo\n- kallisto-bustools via `kb-python`\n- alevin-fry\n\nUse 10x Cell Ranger only when the user explicitly wants vendor-standard output and has accepted the 10x EULA.\n\n## Implementation Sequence\n\nTreat scRNA as three ordered rows in the plugin state and execute them sequentially:\n\n1. FASTQ-to-count:\n   count matrix generation, barcode and feature tables, chemistry or whitelist choice, and a backend summary.\n2. Post-count QC and annotation:\n   raw-count-preserving objects, QC metrics, threshold plots, doublet and ambient-RNA outputs, clustering, UMAPs, and annotation confidence.\n3. Downstream stats:\n   pseudobulk matrices, differential expression or abundance tables, and per-condition plots.\n\nCell Ranger is an optional backend when vendor-standard output is explicitly required. It is not a standalone roadmap row and it is not the default execution target.\n\nFor post-count QC/annotation, use the embedded `skills/scrna-seq-qc` guidance. Route to that skill whenever the requested endpoint starts from a matrix, `.h5`, `.h5ad`, `.rds`, Cell Ranger output, or asks for QC, doublets, ambient RNA, annotation, clustering, UMAPs, or post-count differential summaries.\n\n## Preflight\n\n```bash\npython plugins/ngs-analysis/scripts/ngs_preflight.py --pipeline scrnaseq --emit-install-plan\n```\n\n## Kickoff Pattern\n\nnf-core preflight run:\n\n```bash\npython plugins/ngs-analysis/scripts/run_nfcore_pipeline.py \\\n  --pipeline scrnaseq \\\n  --sample-sheet samplesheet.csv \\\n  --profile docker \\\n  --genome GRCh38 \\\n  --bundle-root grch38_core=/refs/GRCh38\n```\n\nThis adapter captures the generated params, pinned Nextflow command, resource gate, trace/report paths, run manifest, and visualization index in the standard plugin envelope. Add `--revision <tag>` for pinned nf-core execution and `--execute` only when Nextflow plus a container/HPC profile are ready.\n\nPlugin-owned local execution:\n\n```bash\npython plugins/ngs-analysis/scripts/run_scrnaseq_fastq_to_count.py \\\n  --sample-sheet samplesheet.csv \\\n  --genome-fasta reference/genome.fa \\\n  --annotation-gtf reference/genes.gtf \\\n  --cb-whitelist reference/whitelist.txt \\\n  --execute\n```\n\nThe FASTQ-to-count runner emits advisory `resources/resource_plan.json`, `resource_manifest.tsv`, `resource_env.sh`, and `resource_readiness.md` outputs by default. Add `--genome-build`, `--bundle-root <bundle>=<path>`, and `--require-resource-plan` when STARsolo reference bundle completeness should block readiness.\n\nMatrix-level QC should be handled by `scrna-seq-qc` and must preserve raw counts, per-sample metadata, filter decisions, doublet calls, ambient-RNA handling, and plot outputs.\n\n## Guardrails\n\n- Do not assume 10x chemistry from filenames alone.\n- Do not silently skip doublet or ambient-RNA assessment when doing QC.\n- Do not over-annotate clusters without matched references or clear markers.\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}