Skills › Knowledge Work Plugins › nextflow-development › sarek.md
sarek.md
145 lines · bio-research/skills/nextflow-development/references/pipelines/sarek.md at 2574e29
1# nf-core/sarek
3**Version:** 3.7.1
5**Official Documentation:** https://nf-co.re/sarek/3.7.1/
6**GitHub:** https://github.com/nf-core/sarek
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.
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
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_sarekExpected: ~20 min, creates aligned BAMs and variant calls.
Raw lines 17 to 24Samplesheet format
Raw lines 25 to 2627### 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.gzRaw lines 27 to 3435### 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.baiRaw lines 35 to 4142### 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,0status: 0 = normal, 1 = tumor
Variant calling modes
Raw lines 51 to 5253### 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,snpeffRaw lines 53 to 5960### 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,snpeffRaw lines 60 to 6667### 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,snpeffRaw lines 67 to 74Parameters
Raw lines 80 to 8182### 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 HaplotypeCallerfreebayes: FreeBayesdeepvariant: DeepVariant (GPU optional)strelka: Strelka2 germline
Somatic callers:
mutect2: GATK Mutect2strelka: Strelka2 somaticmanta: Structural variants
CNV callers:
ascat: Copy numbercontrolfreec: CNV detectiontiddit: SV calling
Annotation:
snpeff: Functional annotationvep: Variant Effect Predictor
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
| Parameter | Default | Description |
|---|---|---|
--tools | - | Comma-separated list of tools |
--genome | - | GRCh38, GRCh37 |
--wes | false | Exome mode (requires --intervals) |
--intervals | - | BED file for targeted regions |
--joint_germline | false | Joint calling for cohorts |
--skip_bqsr | false | Skip base quality recalibration |
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 130131## 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 140141## 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/