Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
02fc2b9
clean up logic about which vcfs get annotated to be data flow based
FriederikeHanssen Oct 30, 2025
44fda17
pull up parameter handeling, standardise interface
FriederikeHanssen Oct 30, 2025
1c9f14d
add tests
FriederikeHanssen Oct 30, 2025
977e856
add changelog
FriederikeHanssen Oct 30, 2025
5c2f7f0
rework annotation vcf logic
FriederikeHanssen Oct 30, 2025
22b8fbf
update multiqc
FriederikeHanssen Oct 31, 2025
8959f16
fix ordering to preserve resume
FriederikeHanssen Nov 1, 2025
3e3107f
increase timeout to avoid plots not being exported
FriederikeHanssen Nov 1, 2025
66f98ed
update snapshots with naming
FriederikeHanssen Nov 1, 2025
6936920
undo mqc update
FriederikeHanssen Nov 1, 2025
19dc23c
update snapshots
FriederikeHanssen Nov 1, 2025
39e2f56
update tests
FriederikeHanssen Nov 1, 2025
b5c49d6
update snapshot for germline calling
FriederikeHanssen Nov 2, 2025
b840799
don't publish normaized files twice
FriederikeHanssen Nov 2, 2025
10bc7d5
update readme to reflect new logic
FriederikeHanssen Nov 2, 2025
5cf7739
update snapshot
FriederikeHanssen Nov 2, 2025
7a6a68c
remove jq
FriederikeHanssen Nov 3, 2025
446958e
remove jq from script
FriederikeHanssen Nov 3, 2025
65d4a6c
fix subworkflow test, and add single chunk handeling
FriederikeHanssen Nov 3, 2025
2f3772a
merge dev
FriederikeHanssen Nov 3, 2025
2e7e129
remove todo string
FriederikeHanssen Nov 3, 2025
9ac85dd
comment tests back in
FriederikeHanssen Nov 3, 2025
d363908
adress review comments
FriederikeHanssen Nov 4, 2025
b52ab9a
fix snapshot
FriederikeHanssen Nov 4, 2025
1c78f64
update rocrate
FriederikeHanssen Nov 4, 2025
cf4579e
add missing snapshot
FriederikeHanssen Nov 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
#### Changed

- [2041](https://github.com/nf-core/sarek/pull/2041) - Back to dev
- [2043](https://github.com/nf-core/sarek/pull/2043) - Refactor postvariantcalling and split out varlociraptor from other options

#### Fixed

Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ Depending on the options and samples provided, the pipeline can currently perfor
- `Sentieon Haplotyper`
- `Strelka`
- `TIDDIT`
- Post-variant calling options:
- `BCFtools concat` for germline vcfs
- _Experimental Feature_ `BCFtools norm` for all vcfs
- Post-variant calling options, one of:
- `BCFtools concat` for germline vcfs and/or `BCFtools norm` for all vcfs (_experimental Feature_)
- `Varlociraptor` for all vcfs
- Variant filtering and annotation (`SnpEff`, `Ensembl VEP`, `BCFtools annotate`)
- Summarise and represent QC (`MultiQC`)
Expand Down
1 change: 1 addition & 0 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ report_section_order:
order: -1002

export_plots: true
export_plots_timeout: 660

disable_version_detection: true

Expand Down
11 changes: 1 addition & 10 deletions conf/modules/post_variant_calling.config
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,15 @@ process {

withName: 'GERMLINE_VCFS_CONCAT' {
ext.args = { "-a" }
ext.when = { params.concatenate_vcfs }
publishDir = [ enabled: false ]
}

withName: 'ADD_INFO_TO_VCF' {
ext.when = { params.concatenate_vcfs || params.normalize_vcfs }
publishDir = [ enabled: false ]
}

withName: 'GERMLINE_VCFS_CONCAT_SORT' {
ext.prefix = { "${meta.id}.germline" }
ext.when = { params.concatenate_vcfs }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/concat/${meta.id}/" },
Expand All @@ -39,7 +36,6 @@ process {

withName: 'VCFS_NORM_SORT' {
ext.prefix = { "${meta.id}.${meta.variantcaller}.norm" }
ext.when = { params.normalize_vcfs }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/normalized/${meta.id}/" },
Expand All @@ -52,22 +48,18 @@ process {
'--multiallelics -both', // split multiallelic sites into biallelic records and both SNPs and indels should be merged separately into two records
'--rm-dup all' // output only the first instance of a record which is present multiple times
].join(' ') }
ext.when = { params.normalize_vcfs }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/normalized/${meta.id}/" }
enabled: false
]
}

withName: 'TABIX_EXT_VCF' {
ext.prefix = { "${input.baseName}" }
ext.when = { params.concatenate_vcfs || params.normalize_vcfs }
publishDir = [ enabled: false ]
}

withName: 'TABIX_GERMLINE_VCFS_CONCAT_SORT' {
ext.prefix = { "${meta.id}.germline" }
ext.when = { params.concatenate_vcfs }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/concat/${meta.id}/" },
Expand All @@ -77,7 +69,6 @@ process {

withName: 'TABIX_VCFS_NORM_SORT' {
ext.prefix = { "${meta.id}.${meta.variantcaller}.norm" }
ext.when = { params.normalize_vcfs }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/normalized/${meta.id}/" },
Expand Down
51 changes: 28 additions & 23 deletions conf/modules/varlociraptor.config
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ process {
]
}

withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_GERMLINE:RBT_VCFSPLIT|NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_TUMOR_ONLY:RBT_VCFSPLIT' {
withName: '.*:VCF_VARLOCIRAPTOR_GERMLINE:RBT_VCFSPLIT|.*:VCF_VARLOCIRAPTOR_TUMOR_ONLY:RBT_VCFSPLIT' {
ext.prefix = { "${meta.id}.${meta.variantcaller}.split" }
publishDir = [
enabled: false
Expand All @@ -52,22 +52,31 @@ process {
]
}

withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_GERMLINE:VARLOCIRAPTOR_CALLVARIANTS|NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_TUMOR_ONLY:VARLOCIRAPTOR_CALLVARIANTS' {
withName: '.*:VCF_VARLOCIRAPTOR_GERMLINE:VARLOCIRAPTOR_CALLVARIANTS|.*:VCF_VARLOCIRAPTOR_TUMOR_ONLY:VARLOCIRAPTOR_CALLVARIANTS' {
ext.prefix = { "${meta.id}.${meta.variantcaller}.call.${meta.chunk}" }
publishDir = [
enabled: false
]
}

withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_GERMLINE:SORT_CALLED_CHUNKS|NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_TUMOR_ONLY:SORT_CALLED_CHUNKS' {
ext.prefix = { "${meta.id}.${meta.variantcaller}.sort.${meta.chunk}" }
withName: 'SORT_CALLED_CHUNKS' {
ext.args = { '--output-type z --write-index=tbi' }
publishDir = [
enabled: false
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/" },
saveAs: { params.varlociraptor_chunk_size > 1 ? null : "varlociraptor/${meta.id}/${it}" }
]
}

withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_GERMLINE:CONCAT_CALLED_CHUNKS' {
withName: '.*:VCF_VARLOCIRAPTOR_GERMLINE:SORT_CALLED_CHUNKS' {
ext.prefix = { params.varlociraptor_chunk_size > 1 ? "${meta.id}.${meta.variantcaller}.sort.${meta.chunk}" : "${meta.id}.${meta.variantcaller}.germline.varlociraptor"}
}

withName: '.*:VCF_VARLOCIRAPTOR_TUMOR_ONLY:SORT_CALLED_CHUNKS' {
ext.prefix = { params.varlociraptor_chunk_size > 1 ? "${meta.id}.${meta.variantcaller}.sort.${meta.chunk}" : "${meta.id}.${meta.variantcaller}.tumor_only.varlociraptor"}
}

withName: '.*:VCF_VARLOCIRAPTOR_GERMLINE:CONCAT_CALLED_CHUNKS' {
ext.prefix = { "${meta.id}.${meta.variantcaller}.germline.varlociraptor" }
ext.args = { '--allow-overlaps --output-type z --write-index=tbi' }
publishDir = [
Expand All @@ -77,7 +86,7 @@ process {
]
}

withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_TUMOR_ONLY:CONCAT_CALLED_CHUNKS' {
withName: '.*:VCF_VARLOCIRAPTOR_TUMOR_ONLY:CONCAT_CALLED_CHUNKS' {
ext.prefix = { "${meta.id}.${meta.variantcaller}.tumor_only.varlociraptor" }
ext.args = { '--allow-overlaps --output-type z --write-index=tbi' }
publishDir = [
Expand All @@ -90,7 +99,7 @@ process {
//
// VCF_VARLOCIRAPTOR_SOMATIC MODULES
//
withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_SOMATIC:ALIGNMENTPROPERTIES_NORMAL' {
withName: '.*:VCF_VARLOCIRAPTOR_SOMATIC:ALIGNMENTPROPERTIES_NORMAL' {
ext.prefix = { "${meta.normal_id}.normal" }
publishDir = [
mode: params.publish_dir_mode,
Expand All @@ -99,13 +108,13 @@ process {
]
}

withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_SOMATIC:TABIX_GERMLINE|NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_SOMATIC:TABIX_SOMATIC' {
withName: '.*:VCF_VARLOCIRAPTOR_SOMATIC:TABIX_GERMLINE|.*:VCF_VARLOCIRAPTOR_SOMATIC:TABIX_SOMATIC' {
publishDir = [
enabled: false
]
}

withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_SOMATIC:CONCAT_SOMATIC_STRELKA' {
withName: '.*:VCF_VARLOCIRAPTOR_SOMATIC:CONCAT_SOMATIC_STRELKA' {
ext.prefix = { "${meta.id}.strelka" }
ext.args = { '--allow-overlaps --output-type z --write-index=tbi' }
publishDir = [
Expand All @@ -115,7 +124,7 @@ process {
]
}

withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_SOMATIC:MERGE_GERMLINE_SOMATIC_VCFS' {
withName: '.*:VCF_VARLOCIRAPTOR_SOMATIC:MERGE_GERMLINE_SOMATIC_VCFS' {
ext.prefix = { "${meta.id}.${meta.variantcaller}.merged" }
ext.args = { '--output-type z' }
publishDir = [
Expand All @@ -125,21 +134,21 @@ process {
]
}

withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_SOMATIC:RBT_VCFSPLIT' {
withName: '.*:VCF_VARLOCIRAPTOR_SOMATIC:RBT_VCFSPLIT' {
ext.prefix = { "${meta.id}.${meta.variantcaller}.split" }
publishDir = [
enabled: false
]
}

withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_SOMATIC:PREPROCESS_NORMAL' {
withName: '.*:VCF_VARLOCIRAPTOR_SOMATIC:PREPROCESS_NORMAL' {
ext.prefix = { "${meta.normal_id}.${meta.variantcaller}.preprocess.${meta.chunk}" }
publishDir = [
enabled: false
]
}

withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_SOMATIC:ALIGNMENTPROPERTIES_TUMOR' {
withName: '.*:VCF_VARLOCIRAPTOR_SOMATIC:ALIGNMENTPROPERTIES_TUMOR' {
ext.prefix = { "${meta.tumor_id}.tumor" }
publishDir = [
mode: params.publish_dir_mode,
Expand All @@ -148,29 +157,25 @@ process {
]
}

withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_SOMATIC:PREPROCESS_TUMOR' {
withName: '.*:VCF_VARLOCIRAPTOR_SOMATIC:PREPROCESS_TUMOR' {
ext.prefix = { "${meta.tumor_id}.${meta.variantcaller}.preprocess.${meta.chunk}" }
publishDir = [
enabled: false
]
}

withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_SOMATIC:VARLOCIRAPTOR_CALLVARIANTS' {
withName: '.*:VCF_VARLOCIRAPTOR_SOMATIC:VARLOCIRAPTOR_CALLVARIANTS' {
ext.prefix = { "${meta.id}.${meta.variantcaller}.call.${meta.chunk}" }
publishDir = [
enabled: false
]
}

withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_SOMATIC:SORT_CALLED_CHUNKS' {
ext.prefix = { "${meta.id}.${meta.variantcaller}.sort.${meta.chunk}" }
ext.args = { '--output-type z --write-index=tbi' }
publishDir = [
enabled: false
]
withName: '.*:VCF_VARLOCIRAPTOR_SOMATIC:SORT_CALLED_CHUNKS' {
ext.prefix = { params.varlociraptor_chunk_size > 1 ? "${meta.id}.${meta.variantcaller}.sort.${meta.chunk}" : "${meta.id}.${meta.variantcaller}.somatic.varlociraptor"}
}

withName: 'NFCORE_SAREK:SAREK:POST_VARIANTCALLING:VCF_VARLOCIRAPTOR_SOMATIC:CONCAT_CALLED_CHUNKS' {
withName: '.*:VCF_VARLOCIRAPTOR_SOMATIC:CONCAT_CALLED_CHUNKS' {
ext.prefix = { "${meta.id}.${meta.variantcaller}.somatic.varlociraptor" }
ext.args = { '--allow-overlaps --output-type z --write-index=tbi' }
publishDir = [
Expand Down
2 changes: 1 addition & 1 deletion conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ process {
resourceLimits = [
cpus: 4,
memory: '15.GB',
time: '1.h'
time: '2.h'
]
withName:BWAMEM2_INDEX {
memory = { 6.GB }
Expand Down
4 changes: 4 additions & 0 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ workflow NFCORE_SAREK {
PREPARE_GENOME.out.pon,
PREPARE_GENOME.out.pon_tbi,
params.sentieon_dnascope_model ? Channel.fromPath(params.sentieon_dnascope_model).collect() : Channel.value([]),
// Set Varlociraptor reference files
params.varlociraptor_scenario_germline ? Channel.fromPath(params.varlociraptor_scenario_germline).map { it -> [[id: it.baseName - '.yte'], it] }.collect() : Channel.fromPath("${projectDir}/assets/varlociraptor_germline.yte.yaml").collect(),
params.varlociraptor_scenario_somatic ? Channel.fromPath(params.varlociraptor_scenario_somatic).map { it -> [[id: it.baseName - '.yte'], it] }.collect() : Channel.fromPath("${projectDir}/assets/varlociraptor_somatic.yte.yaml").collect(),
params.varlociraptor_scenario_tumor_only ? Channel.fromPath(params.varlociraptor_scenario_tumor_only).map { it -> [[id: it.baseName - '.yte'], it] }.collect() : Channel.fromPath("${projectDir}/assets/varlociraptor_tumor_only.yte.yaml").collect(),
snpeff_cache,
params.snpeff_db,
vep_cache,
Expand Down
3 changes: 2 additions & 1 deletion nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,8 @@
"varlociraptor_chunk_size": {
"type": "integer",
"default": 15,
"description": "Number of chunks to split the vcf-files for varlociraptor",
"minimum": 1,
"description": "Number of chunks to split the vcf-files for varlociraptor. Minimum 1, indicates no splitting",
"hidden": true
},
"varlociraptor_scenario_germline": {
Expand Down
Loading
Loading