Skill 02 · Nextflow Development
Subchapter 2.5
references/pipelines/sarek.mdMarkdown4 KBView on GitHub
Note: When updating to a new version, check the releases page (opens in a new tab) for breaking changes and update the version in commands below.
nextflow run nf-core/sarek -r 3.7.1 -profile test,docker --outdir test_sarekExpected: ~20 min, creates aligned BAMs and variant calls.
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.gzpatient,sample,bam,bai
patient1,tumor,/path/to/tumor.bam,/path/to/tumor.bam.bai
patient1,normal,/path/to/normal.bam,/path/to/normal.bam.baipatient,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
nextflow run nf-core/sarek -r 3.7.1 -profile docker \
--input samplesheet.csv --outdir results --genome GRCh38 \
--tools haplotypecaller,snpeffnextflow run nf-core/sarek -r 3.7.1 -profile docker \
--input samplesheet.csv --outdir results --genome GRCh38 \
--tools mutect2,strelka,snpeffnextflow 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--tools haplotypecaller --joint_germlineGermline callers:
haplotypecaller: GATK HaplotypeCallerfreebayes: FreeBayesdeepvariant: DeepVariant (GPU optional)strelka: Strelka2 germlineSomatic callers:
mutect2: GATK Mutect2strelka: Strelka2 somaticmanta: Structural variantsCNV callers:
ascat: Copy numbercontrolfreec: CNV detectiontiddit: SV callingAnnotation:
snpeff: Functional annotationvep: Variant Effect Predictor| 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 |
results/
├── preprocessing/
│ └── recalibrated/ # Analysis-ready BAMs
│ └── *.recal.bam
├── variant_calling/
│ ├── haplotypecaller/ # Germline VCFs
│ ├── mutect2/ # Somatic VCFs (filtered)
│ └── strelka/
├── annotation/
│ └── snpeff/ # Annotated VCFs
└── multiqc/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.