Skill Tracer
Skills › Knowledge Work Plugins › nextflow-development › sarek.md

sarek.md

145 lines · bio-research/skills/nextflow-development/references/pipelines/sarek.md at 2574e29

Open on GitHub
1# nf-core/sarek
2
3**Version:** 3.7.1
4
5**Official Documentation:** https://nf-co.re/sarek/3.7.1/
6**GitHub:** https://github.com/nf-core/sarek
7
8> **Note:** When updating to a new version, check the [releases page](https://github.com/nf-core/sarek/releases) for breaking changes and update the version in commands below.
9

nf-core/sarek

Version: 3.7.1

Official Documentation: https://nf-co.re/sarek/3.7.1/ GitHub: https://github.com/nf-core/sarek

Note: When updating to a new version, check the releases page for breaking changes and update the version in commands below.
Raw lines 1 to 9
10## Contents
11- [Test command](#test-command)
12- [Samplesheet format](#samplesheet-format)
13- [Variant calling modes](#variant-calling-modes)
14- [Parameters](#parameters)
15- [Output files](#output-files)

Contents

  • Test command
  • Samplesheet format
  • Variant calling modes
  • Parameters
  • Output files
Raw lines 10 to 16
17## Test command
19```bash
20nextflow run nf-core/sarek -r 3.7.1 -profile test,docker --outdir test_sarek
21```
23Expected: ~20 min, creates aligned BAMs and variant calls.

Test command

nextflow run nf-core/sarek -r 3.7.1 -profile test,docker --outdir test_sarek

Expected: ~20 min, creates aligned BAMs and variant calls.

Raw lines 17 to 24
25## Samplesheet format

Samplesheet format

Raw lines 25 to 26
27### From FASTQ
28```csv
29patient,sample,lane,fastq_1,fastq_2
30patient1,tumor,L001,/path/to/tumor_L001_R1.fq.gz,/path/to/tumor_L001_R2.fq.gz
31patient1,tumor,L002,/path/to/tumor_L002_R1.fq.gz,/path/to/tumor_L002_R2.fq.gz
32patient1,normal,L001,/path/to/normal_R1.fq.gz,/path/to/normal_R2.fq.gz
33```

From FASTQ

patient,sample,lane,fastq_1,fastq_2
patient1,tumor,L001,/path/to/tumor_L001_R1.fq.gz,/path/to/tumor_L001_R2.fq.gz
patient1,tumor,L002,/path/to/tumor_L002_R1.fq.gz,/path/to/tumor_L002_R2.fq.gz
patient1,normal,L001,/path/to/normal_R1.fq.gz,/path/to/normal_R2.fq.gz
Raw lines 27 to 34
35### From BAM/CRAM
36```csv
37patient,sample,bam,bai
38patient1,tumor,/path/to/tumor.bam,/path/to/tumor.bam.bai
39patient1,normal,/path/to/normal.bam,/path/to/normal.bam.bai
40```

From BAM/CRAM

patient,sample,bam,bai
patient1,tumor,/path/to/tumor.bam,/path/to/tumor.bam.bai
patient1,normal,/path/to/normal.bam,/path/to/normal.bam.bai
Raw lines 35 to 41
42### With tumor/normal status
43```csv
44patient,sample,lane,fastq_1,fastq_2,status
45patient1,tumor,L001,tumor_R1.fq.gz,tumor_R2.fq.gz,1
46patient1,normal,L001,normal_R1.fq.gz,normal_R2.fq.gz,0
47```
49`status`: 0 = normal, 1 = tumor

With tumor/normal status

patient,sample,lane,fastq_1,fastq_2,status
patient1,tumor,L001,tumor_R1.fq.gz,tumor_R2.fq.gz,1
patient1,normal,L001,normal_R1.fq.gz,normal_R2.fq.gz,0

status: 0 = normal, 1 = tumor

Raw lines 42 to 50
51## Variant calling modes

Variant calling modes

Raw lines 51 to 52
53### Germline (single sample)
54```bash
55nextflow run nf-core/sarek -r 3.7.1 -profile docker \
56 --input samplesheet.csv --outdir results --genome GRCh38 \
57 --tools haplotypecaller,snpeff
58```

Germline (single sample)

nextflow run nf-core/sarek -r 3.7.1 -profile docker \
    --input samplesheet.csv --outdir results --genome GRCh38 \
    --tools haplotypecaller,snpeff
Raw lines 53 to 59
60### Somatic (tumor-normal pair)
61```bash
62nextflow run nf-core/sarek -r 3.7.1 -profile docker \
63 --input samplesheet.csv --outdir results --genome GRCh38 \
64 --tools mutect2,strelka,snpeff
65```

Somatic (tumor-normal pair)

nextflow run nf-core/sarek -r 3.7.1 -profile docker \
    --input samplesheet.csv --outdir results --genome GRCh38 \
    --tools mutect2,strelka,snpeff
Raw lines 60 to 66
67### WES (exome)
68```bash
69nextflow run nf-core/sarek -r 3.7.1 -profile docker \
70 --input samplesheet.csv --outdir results --genome GRCh38 \
71 --wes --intervals /path/to/targets.bed \
72 --tools haplotypecaller,snpeff
73```

WES (exome)

nextflow run nf-core/sarek -r 3.7.1 -profile docker \
    --input samplesheet.csv --outdir results --genome GRCh38 \
    --wes --intervals /path/to/targets.bed \
    --tools haplotypecaller,snpeff
Raw lines 67 to 74
75### Joint germline (cohort)
76```bash
77--tools haplotypecaller --joint_germline
78```

Joint germline (cohort)

--tools haplotypecaller --joint_germline
Raw lines 75 to 79
80## Parameters
82### Available tools
84**Germline callers:**
85- `haplotypecaller`: GATK HaplotypeCaller
86- `freebayes`: FreeBayes
87- `deepvariant`: DeepVariant (GPU optional)
88- `strelka`: Strelka2 germline
90**Somatic callers:**
91- `mutect2`: GATK Mutect2
92- `strelka`: Strelka2 somatic
93- `manta`: Structural variants
95**CNV callers:**
96- `ascat`: Copy number
97- `controlfreec`: CNV detection
98- `tiddit`: SV calling
100**Annotation:**
101- `snpeff`: Functional annotation
102- `vep`: Variant Effect Predictor

Available tools

Germline callers:

  • haplotypecaller: GATK HaplotypeCaller
  • freebayes: FreeBayes
  • deepvariant: DeepVariant (GPU optional)
  • strelka: Strelka2 germline

Somatic callers:

  • mutect2: GATK Mutect2
  • strelka: Strelka2 somatic
  • manta: Structural variants

CNV callers:

  • ascat: Copy number
  • controlfreec: CNV detection
  • tiddit: SV calling

Annotation:

  • snpeff: Functional annotation
  • vep: Variant Effect Predictor
Raw lines 82 to 103
104### Key parameters
106| Parameter | Default | Description |
107|-----------|---------|-------------|
108| `--tools` | - | Comma-separated list of tools |
109| `--genome` | - | `GRCh38`, `GRCh37` |
110| `--wes` | false | Exome mode (requires `--intervals`) |
111| `--intervals` | - | BED file for targeted regions |
112| `--joint_germline` | false | Joint calling for cohorts |
113| `--skip_bqsr` | false | Skip base quality recalibration |

Key parameters

ParameterDefaultDescription
--tools-Comma-separated list of tools
--genome-GRCh38, GRCh37
--wesfalseExome mode (requires --intervals)
--intervals-BED file for targeted regions
--joint_germlinefalseJoint calling for cohorts
--skip_bqsrfalseSkip base quality recalibration
Raw lines 104 to 114
115## Output files
117```
118results/
119├── preprocessing/
120│ └── recalibrated/ # Analysis-ready BAMs
121│ └── *.recal.bam
122├── variant_calling/
123│ ├── haplotypecaller/ # Germline VCFs
124│ ├── mutect2/ # Somatic VCFs (filtered)
125│ └── strelka/
126├── annotation/
127│ └── snpeff/ # Annotated VCFs
128└── multiqc/
129```

Output files

results/
├── preprocessing/
│   └── recalibrated/           # Analysis-ready BAMs
│       └── *.recal.bam
├── variant_calling/
│   ├── haplotypecaller/        # Germline VCFs
│   ├── mutect2/                # Somatic VCFs (filtered)
│   └── strelka/
├── annotation/
│   └── snpeff/                 # Annotated VCFs
└── multiqc/
Raw lines 115 to 130
131## Troubleshooting
133**BQSR fails**: Check known sites available for genome. Skip with `--skip_bqsr` for non-standard references.
135**Mutect2 no variants**: Verify tumor/normal pairing in samplesheet (check `status` column).
137**Out of memory**: `--max_memory '128.GB'` for WGS.
139**DeepVariant GPU**: Ensure NVIDIA Docker runtime configured.

Troubleshooting

BQSR fails: Check known sites available for genome. Skip with --skip_bqsr for non-standard references.

Mutect2 no variants: Verify tumor/normal pairing in samplesheet (check status column).

Out of memory: --max_memory '128.GB' for WGS.

DeepVariant GPU: Ensure NVIDIA Docker runtime configured.

Raw lines 131 to 140
141## More Information
143- **Full parameter list:** https://nf-co.re/sarek/3.7.1/parameters/
144- **Output documentation:** https://nf-co.re/sarek/3.7.1/docs/output/
145- **Usage documentation:** https://nf-co.re/sarek/3.7.1/docs/usage/

More Information

  • Full parameter list: https://nf-co.re/sarek/3.7.1/parameters/
  • Output documentation: https://nf-co.re/sarek/3.7.1/docs/output/
  • Usage documentation: https://nf-co.re/sarek/3.7.1/docs/usage/
Raw lines 141 to 145