$npx -y skills add anthropics/knowledge-work-plugins --skill nextflow-developmentRun nf-core bioinformatics pipelines (rnaseq, sarek, atacseq) on sequencing data. Use when analyzing RNA-seq, WGS/WES, or ATAC-seq data—either local FASTQs or public datasets from GEO/SRA. Triggers on nf-core, Nextflow, FASTQ analysis, variant calling, gene expression, differenti
| 1 | # nf-core Pipeline Deployment |
| 2 | |
| 3 | Run nf-core bioinformatics pipelines on local or public sequencing data. |
| 4 | |
| 5 | **Target users:** Bench scientists and researchers without specialized bioinformatics training who need to run large-scale omics analyses—differential expression, variant calling, or chromatin accessibility analysis. |
| 6 | |
| 7 | ## Workflow Checklist |
| 8 | |
| 9 | ``` |
| 10 | - [ ] Step 0: Acquire data (if from GEO/SRA) |
| 11 | - [ ] Step 1: Environment check (MUST pass) |
| 12 | - [ ] Step 2: Select pipeline (confirm with user) |
| 13 | - [ ] Step 3: Run test profile (MUST pass) |
| 14 | - [ ] Step 4: Create samplesheet |
| 15 | - [ ] Step 5: Configure & run (confirm genome with user) |
| 16 | - [ ] Step 6: Verify outputs |
| 17 | ``` |
| 18 | |
| 19 | --- |
| 20 | |
| 21 | ## Step 0: Acquire Data (GEO/SRA Only) |
| 22 | |
| 23 | **Skip this step if user has local FASTQ files.** |
| 24 | |
| 25 | For public datasets, fetch from GEO/SRA first. See [references/geo-sra-acquisition.md](references/geo-sra-acquisition.md) for the full workflow. |
| 26 | |
| 27 | **Quick start:** |
| 28 | |
| 29 | ```bash |
| 30 | # 1. Get study info |
| 31 | python scripts/sra_geo_fetch.py info GSE110004 |
| 32 | |
| 33 | # 2. Download (interactive mode) |
| 34 | python scripts/sra_geo_fetch.py download GSE110004 -o ./fastq -i |
| 35 | |
| 36 | # 3. Generate samplesheet |
| 37 | python scripts/sra_geo_fetch.py samplesheet GSE110004 --fastq-dir ./fastq -o samplesheet.csv |
| 38 | ``` |
| 39 | |
| 40 | **DECISION POINT:** After fetching study info, confirm with user: |
| 41 | - Which sample subset to download (if multiple data types) |
| 42 | - Suggested genome and pipeline |
| 43 | |
| 44 | Then continue to Step 1. |
| 45 | |
| 46 | --- |
| 47 | |
| 48 | ## Step 1: Environment Check |
| 49 | |
| 50 | **Run first. Pipeline will fail without passing environment.** |
| 51 | |
| 52 | ```bash |
| 53 | python scripts/check_environment.py |
| 54 | ``` |
| 55 | |
| 56 | All critical checks must pass. If any fail, provide fix instructions: |
| 57 | |
| 58 | ### Docker issues |
| 59 | |
| 60 | | Problem | Fix | |
| 61 | |---------|-----| |
| 62 | | Not installed | Install from https://docs.docker.com/get-docker/ | |
| 63 | | Permission denied | `sudo usermod -aG docker $USER` then re-login | |
| 64 | | Daemon not running | `sudo systemctl start docker` | |
| 65 | |
| 66 | ### Nextflow issues |
| 67 | |
| 68 | | Problem | Fix | |
| 69 | |---------|-----| |
| 70 | | Not installed | `curl -s https://get.nextflow.io \| bash && mv nextflow ~/bin/` | |
| 71 | | Version < 23.04 | `nextflow self-update` | |
| 72 | |
| 73 | ### Java issues |
| 74 | |
| 75 | | Problem | Fix | |
| 76 | |---------|-----| |
| 77 | | Not installed / < 11 | `sudo apt install openjdk-11-jdk` | |
| 78 | |
| 79 | **Do not proceed until all checks pass.** For HPC/Singularity, see [references/troubleshooting.md](references/troubleshooting.md). |
| 80 | |
| 81 | --- |
| 82 | |
| 83 | ## Step 2: Select Pipeline |
| 84 | |
| 85 | **DECISION POINT: Confirm with user before proceeding.** |
| 86 | |
| 87 | | Data Type | Pipeline | Version | Goal | |
| 88 | |-----------|----------|---------|------| |
| 89 | | RNA-seq | `rnaseq` | 3.22.2 | Gene expression | |
| 90 | | WGS/WES | `sarek` | 3.7.1 | Variant calling | |
| 91 | | ATAC-seq | `atacseq` | 2.1.2 | Chromatin accessibility | |
| 92 | |
| 93 | Auto-detect from data: |
| 94 | ```bash |
| 95 | python scripts/detect_data_type.py /path/to/data |
| 96 | ``` |
| 97 | |
| 98 | For pipeline-specific details: |
| 99 | - [references/pipelines/rnaseq.md](references/pipelines/rnaseq.md) |
| 100 | - [references/pipelines/sarek.md](references/pipelines/sarek.md) |
| 101 | - [references/pipelines/atacseq.md](references/pipelines/atacseq.md) |
| 102 | |
| 103 | --- |
| 104 | |
| 105 | ## Step 3: Run Test Profile |
| 106 | |
| 107 | **Validates environment with small data. MUST pass before real data.** |
| 108 | |
| 109 | ```bash |
| 110 | nextflow run nf-core/<pipeline> -r <version> -profile test,docker --outdir test_output |
| 111 | ``` |
| 112 | |
| 113 | | Pipeline | Command | |
| 114 | |----------|---------| |
| 115 | | rnaseq | `nextflow run nf-core/rnaseq -r 3.22.2 -profile test,docker --outdir test_rnaseq` | |
| 116 | | sarek | `nextflow run nf-core/sarek -r 3.7.1 -profile test,docker --outdir test_sarek` | |
| 117 | | atacseq | `nextflow run nf-core/atacseq -r 2.1.2 -profile test,docker --outdir test_atacseq` | |
| 118 | |
| 119 | Verify: |
| 120 | ```bash |
| 121 | ls test_output/multiqc/multiqc_report.html |
| 122 | grep "Pipeline completed successfully" .nextflow.log |
| 123 | ``` |
| 124 | |
| 125 | If test fails, see [references/troubleshooting.md](references/troubleshooting.md). |
| 126 | |
| 127 | --- |
| 128 | |
| 129 | ## Step 4: Create Samplesheet |
| 130 | |
| 131 | ### Generate automatically |
| 132 | |
| 133 | ```bash |
| 134 | python scripts/generate_samplesheet.py /path/to/data <pipeline> -o samplesheet.csv |
| 135 | ``` |
| 136 | |
| 137 | The script: |
| 138 | - Discovers FASTQ/BAM/CRAM files |
| 139 | - Pairs R1/R2 reads |
| 140 | - Infers sample metadata |
| 141 | - Validates before writing |
| 142 | |
| 143 | **For sarek:** Script prompts for tumor/normal status if not auto-detected. |
| 144 | |
| 145 | ### Validate existing samplesheet |
| 146 | |
| 147 | ```bash |
| 148 | python scripts/generate_samplesheet.py --validate samplesheet.csv <pipeline> |
| 149 | ``` |
| 150 | |
| 151 | ### Samplesheet formats |
| 152 | |
| 153 | **rnaseq:** |
| 154 | ```csv |
| 155 | sample,fastq_1,fastq_2,strandedness |
| 156 | SAMPLE1,/abs/path/R1.fq.gz,/abs/path/R2.fq.gz,auto |
| 157 | ``` |
| 158 | |
| 159 | **sarek:** |
| 160 | ```csv |
| 161 | patient,sample,lane,fastq_1,fastq_2,status |
| 162 | patient1,tumor,L001,/abs/path/tumor_R1.fq.gz,/abs/path/tumor_R2.fq.gz,1 |
| 163 | patient1,normal,L001,/abs/path/normal_R1.fq.gz,/abs/path/normal_R2.fq.gz,0 |
| 164 | ``` |
| 165 | |
| 166 | **atacseq:** |
| 167 | ```csv |
| 168 | sample,fastq_1,fastq_2,replicate |
| 169 | CONTROL,/abs/path/c |