Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 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
36ccda2
expose tbi channels
FriederikeHanssen Oct 30, 2025
cb15e18
add parameter for filtering
FriederikeHanssen Oct 30, 2025
5c2f7f0
rework annotation vcf logic
FriederikeHanssen Oct 30, 2025
180f669
Merge remote-tracking branch 'origin/refactor_postvc' into add_filtering
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
956da5d
Remove module tests
FriederikeHanssen Nov 2, 2025
ea00dc7
Merge remote-tracking branch 'origin/refactor_postvc' into add_filtering
FriederikeHanssen Nov 2, 2025
6409166
update subway map
FriederikeHanssen Nov 2, 2025
8ea6231
update documentation
FriederikeHanssen Nov 2, 2025
08ea2f9
add params and publishing
FriederikeHanssen Nov 2, 2025
9605ffa
install module
FriederikeHanssen Nov 2, 2025
9fa4cd2
fix channel wiring to normalize channel to account for filtered vcfs
FriederikeHanssen Nov 2, 2025
b3a86fe
add tests for filtering
FriederikeHanssen Nov 2, 2025
70ac5ad
remove unnecessary tabix process
FriederikeHanssen Nov 2, 2025
a31167f
remove publishing for unused process
FriederikeHanssen Nov 2, 2025
4f27e32
fix ordering of TOC
FriederikeHanssen Nov 2, 2025
373d513
Update Changelog
FriederikeHanssen Nov 2, 2025
940efbf
fix formatting
FriederikeHanssen Nov 2, 2025
e9c186c
enable filtering on full size tests
FriederikeHanssen Nov 2, 2025
5cf7739
update snapshot
FriederikeHanssen Nov 2, 2025
86fb7ae
fix freebayes filtered publishing
FriederikeHanssen Nov 2, 2025
7a6a68c
remove jq
FriederikeHanssen Nov 3, 2025
446958e
remove jq from script
FriederikeHanssen Nov 3, 2025
e133711
make all index computation implicit to bcftools
FriederikeHanssen Nov 3, 2025
b36d4fa
use basename whereever possible to ensure vc that produce multpiple o…
FriederikeHanssen Nov 3, 2025
d3b0374
update snapshots
FriederikeHanssen Nov 3, 2025
47a9f93
fix output naming
FriederikeHanssen Nov 3, 2025
ba68c14
update file paths
FriederikeHanssen Nov 3, 2025
c4a3c53
switch emit channel to account for implicit index creation
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
9f60221
merge origin/refactor_postvc
FriederikeHanssen Nov 4, 2025
b2b9706
merge upstream/dev
FriederikeHanssen Nov 4, 2025
1a68418
fix freebayes snapshots
FriederikeHanssen Nov 4, 2025
53a8efe
Update subworkflows/local/post_variantcalling/main.nf
FriederikeHanssen Nov 4, 2025
2eff459
remove merge conflict marker
FriederikeHanssen Nov 4, 2025
4d5b2b9
Merge remote-tracking branch 'origin/add_filtering' into add_filtering
FriederikeHanssen Nov 4, 2025
7b9100c
fix linting
FriederikeHanssen Nov 4, 2025
f2ee838
fix channel name
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
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- [2044](https://github.com/nf-core/sarek/pull/2044) - Add filtering with `bcftools view -f PASS` following variantcalling step

### Changed

### Fixed
Expand Down Expand Up @@ -64,8 +66,10 @@ This patch release includes a bump to Nextflow 25.04.8.

### Parameters

| Params | status |
| ------ | ------ |
| Params | status |
| ---------------------------- | ------ |
| `--filter_vcfs` | New |
| `--bcftools_filter_criteria` | New |

### Developer section

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Depending on the options and samples provided, the pipeline can currently perfor
- `Strelka`
- `TIDDIT`
- Post-variant calling options, one of:
- `BCFtools concat` for germline vcfs and/or `BCFtools norm` for all vcfs (_experimental Feature_)
- `BCFtools concat` for germline vcfs and/or `BCFtools view` (default: filter by `PASS`), `BCFtools norm` for all vcfs
- `Varlociraptor` for all vcfs
- Variant filtering and annotation (`SnpEff`, `Ensembl VEP`, `BCFtools annotate`)
- Summarise and represent QC (`MultiQC`)
Expand Down
8 changes: 8 additions & 0 deletions conf/modules/freebayes.config
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ process {
]
}

withName: 'TABIX_VC_FREEBAYES_FILT' {
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/freebayes/${meta.id}/" },
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

// PAIR_VARIANT_CALLING
if (params.tools && params.tools.split(',').contains('freebayes')) {
withName: '.*:BAM_VARIANT_CALLING_SOMATIC_ALL:BAM_VARIANT_CALLING_FREEBAYES:FREEBAYES' {
Expand Down
63 changes: 30 additions & 33 deletions conf/modules/post_variant_calling.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,29 @@

process {

withName: 'GERMLINE_VCFS_CONCAT' {
ext.args = { "-a" }
publishDir = [ enabled: false ]
withName: 'FILTER_VCFS' {
ext.args = { [ params.bcftools_filter_criteria,
"--output-type z --write-index=tbi"
].join(" ").trim() }
ext.prefix = { vcf.baseName - '.vcf' + '.bcftools_filtered' }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/filtered/${meta.id}/" },
pattern: "*{.tbi,.vcf.gz}"
]
}

withName: 'ADD_INFO_TO_VCF' {
publishDir = [ enabled: false ]
}

withName: 'GERMLINE_VCFS_CONCAT_SORT' {
ext.prefix = { "${meta.id}.germline" }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/concat/${meta.id}/" },
pattern: "*vcf.gz"
]
}

withName: 'VCFS_NORM_SORT' {
ext.prefix = { "${meta.id}.${meta.variantcaller}.norm" }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/normalized/${meta.id}/" },
pattern: "*vcf.gz"
]
withName: 'TABIX_EXT_VCF' {
ext.prefix = { "${input.baseName}" }
publishDir = [ enabled: false ]
}

withName: 'VCFS_NORM' {
ext.prefix = { vcf.baseName - '.added_info.vcf' + '.norm' }
ext.args = { [
'--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
Expand All @@ -53,27 +48,29 @@ process {
]
}

withName: 'TABIX_EXT_VCF' {
ext.prefix = { "${input.baseName}" }
publishDir = [ enabled: false ]
}

withName: 'TABIX_GERMLINE_VCFS_CONCAT_SORT' {
ext.prefix = { "${meta.id}.germline" }
withName: 'VCFS_NORM_SORT' {
ext.prefix = { vcf.baseName - '.vcf' + '.sorted' }
ext.args = "--output-type z --write-index=tbi"
ext.when = { params.normalize_vcfs }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/concat/${meta.id}/" },
pattern: "*.tbi"
path: { "${params.outdir}/variant_calling/normalized/${meta.id}/" },
pattern: "*{vcf.gz,tbi}"
]
}

withName: 'TABIX_VCFS_NORM_SORT' {
ext.prefix = { "${meta.id}.${meta.variantcaller}.norm" }
withName: 'GERMLINE_VCFS_CONCAT' {
ext.args = { "-a --output-type z" }
publishDir = [ enabled: false ]
}

withName: 'GERMLINE_VCFS_CONCAT_SORT' {
ext.prefix = { "${meta.id}.germline" }
ext.args = "--output-type z --write-index=tbi"
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/normalized/${meta.id}/" },
pattern: "*.tbi"
path: { "${params.outdir}/variant_calling/concat/${meta.id}/" },
pattern: "*{vcf.gz,tbi}"
]
}

}
1 change: 1 addition & 0 deletions conf/test_full.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ params {
split_fastq = 20000000
intervals = 's3://ngi-igenomes/test-data/sarek/S07604624_Padded_Agilent_SureSelectXT_allexons_V6_UTR.bed'
wes = true
filter_vcfs = true
}

process {
Expand Down
1 change: 1 addition & 0 deletions conf/test_full_germline.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ params {
// Other params
tools = 'cnvkit,deepvariant,freebayes,haplotypecaller,indexcov,manta,strelka,tiddit,snpeff,vep'
split_fastq = 50000000
filter_vcfs = true
}
Binary file modified docs/images/sarek_subway.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
124 changes: 78 additions & 46 deletions docs/images/sarek_subway.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading