Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoiding clashes of config of FILTERVARIANTTRANCHES in different subworkflows #1315

Merged
merged 4 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ jobs:
nextflow secrets set SENTIEON_AUTH_MECH_BASE64 ${{ secrets.SENTIEON_AUTH_MECH_BASE64 }}
SENTIEON_ENCRYPTION_KEY=$(echo -n "${{ secrets.ENCRYPTION_KEY_BASE64 }}" | base64 -d)
SENTIEON_LICENSE_MESSAGE=$(echo -n "${{ secrets.LICENSE_MESSAGE_BASE64 }}" | base64 -d)
SENTIEON_AUTH_DATA=$(python3 tests/modules/nf-core/sentieon/license_message.py encrypt --key "$SENTIEON_ENCRYPTION_KEY" --message "$SENTIEON_LICENSE_MESSAGE")
SENTIEON_AUTH_DATA=$(python3 bin/license_message.py encrypt --key "$SENTIEON_ENCRYPTION_KEY" --message "$SENTIEON_LICENSE_MESSAGE")
SENTIEON_AUTH_DATA_BASE64=$(echo -n "$SENTIEON_AUTH_DATA" | base64 -w 0)
nextflow secrets set SENTIEON_AUTH_DATA_BASE64 $SENTIEON_AUTH_DATA_BASE64

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1287](https://github.com/nf-core/sarek/pull/1287) - Adding label `process_single` to local modules
- [#1298](https://github.com/nf-core/sarek/pull/1298) - Fix annotation cache usage
- [#1301](https://github.com/nf-core/sarek/pull/1301) - Fix nf-prov usage
- [#1315](https://github.com/nf-core/sarek/pull/1315) - Avoid clash of configs of `FILTERVARIANTTRANCHES` in the Sentieon-Haplotyper and GATK-Haplotypecaller subworkflows

### Removed

Expand Down
2 changes: 1 addition & 1 deletion conf/modules/haplotypecaller.config
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ process {
]
}

withName: 'FILTERVARIANTTRANCHES' {
withName: '.*:VCF_VARIANT_FILTERING_GATK:FILTERVARIANTTRANCHES' {
ext.prefix = {"${meta.id}.haplotypecaller"}
ext.args = { "--info-key CNN_1D" }
publishDir = [
Expand Down
12 changes: 0 additions & 12 deletions conf/modules/sentieon_dnascope.config
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,6 @@ process {
]
}

if (params.tools && params.tools.contains('sentieon_dnascope')) {
withName: '.*FILTERVARIANTTRANCHES' {
ext.prefix = {"${meta.id}.dnascope"}
ext.args = { "--info-key CNN_1D" }
publishDir = [
mode: params.publish_dir_mode,
path: { "${params.outdir}/variant_calling/sentieon_dnascope/${meta.id}/"},
pattern: "*{vcf.gz,vcf.gz.tbi}"
]
}
}

withName: 'SENTIEON_DNAMODELAPPLY' {
ext.prefix = {"${meta.id}.dnascope.filtered"}
publishDir = [
Expand Down
2 changes: 1 addition & 1 deletion conf/modules/sentieon_haplotyper.config
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ process {
}

if (params.tools && params.tools.contains('sentieon_haplotyper')) {
withName: '.*FILTERVARIANTTRANCHES' {
withName: '.*:SENTIEON_HAPLOTYPER_VCF_VARIANT_FILTERING_GATK:FILTERVARIANTTRANCHES' {
ext.prefix = {"${meta.id}.haplotyper"}
ext.args = { "--info-key CNN_1D" }
publishDir = [
Expand Down
35 changes: 18 additions & 17 deletions subworkflows/local/bam_variant_calling_germline_all/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@
// GERMLINE VARIANT CALLING
//

include { BAM_JOINT_CALLING_GERMLINE_GATK } from '../bam_joint_calling_germline_gatk/main'
include { BAM_JOINT_CALLING_GERMLINE_SENTIEON } from '../bam_joint_calling_germline_sentieon/main'
include { BAM_VARIANT_CALLING_CNVKIT } from '../bam_variant_calling_cnvkit/main'
include { BAM_VARIANT_CALLING_DEEPVARIANT } from '../bam_variant_calling_deepvariant/main'
include { BAM_VARIANT_CALLING_FREEBAYES } from '../bam_variant_calling_freebayes/main'
include { BAM_VARIANT_CALLING_GERMLINE_MANTA } from '../bam_variant_calling_germline_manta/main'
include { BAM_VARIANT_CALLING_HAPLOTYPECALLER } from '../bam_variant_calling_haplotypecaller/main'
include { BAM_VARIANT_CALLING_SENTIEON_DNASCOPE } from '../bam_variant_calling_sentieon_dnascope/main'
include { BAM_VARIANT_CALLING_SENTIEON_HAPLOTYPER } from '../bam_variant_calling_sentieon_haplotyper/main'
include { BAM_VARIANT_CALLING_MPILEUP } from '../bam_variant_calling_mpileup/main'
include { BAM_VARIANT_CALLING_SINGLE_STRELKA } from '../bam_variant_calling_single_strelka/main'
include { BAM_VARIANT_CALLING_SINGLE_TIDDIT } from '../bam_variant_calling_single_tiddit/main'
include { SENTIEON_DNAMODELAPPLY } from '../../../modules/nf-core/sentieon/dnamodelapply/main'
include { VCF_VARIANT_FILTERING_GATK } from '../vcf_variant_filtering_gatk/main'
include { BAM_JOINT_CALLING_GERMLINE_GATK } from '../bam_joint_calling_germline_gatk/main'
include { BAM_JOINT_CALLING_GERMLINE_SENTIEON } from '../bam_joint_calling_germline_sentieon/main'
include { BAM_VARIANT_CALLING_CNVKIT } from '../bam_variant_calling_cnvkit/main'
include { BAM_VARIANT_CALLING_DEEPVARIANT } from '../bam_variant_calling_deepvariant/main'
include { BAM_VARIANT_CALLING_FREEBAYES } from '../bam_variant_calling_freebayes/main'
include { BAM_VARIANT_CALLING_GERMLINE_MANTA } from '../bam_variant_calling_germline_manta/main'
include { BAM_VARIANT_CALLING_HAPLOTYPECALLER } from '../bam_variant_calling_haplotypecaller/main'
include { BAM_VARIANT_CALLING_SENTIEON_DNASCOPE } from '../bam_variant_calling_sentieon_dnascope/main'
include { BAM_VARIANT_CALLING_SENTIEON_HAPLOTYPER } from '../bam_variant_calling_sentieon_haplotyper/main'
include { BAM_VARIANT_CALLING_MPILEUP } from '../bam_variant_calling_mpileup/main'
include { BAM_VARIANT_CALLING_SINGLE_STRELKA } from '../bam_variant_calling_single_strelka/main'
include { BAM_VARIANT_CALLING_SINGLE_TIDDIT } from '../bam_variant_calling_single_tiddit/main'
include { SENTIEON_DNAMODELAPPLY } from '../../../modules/nf-core/sentieon/dnamodelapply/main'
include { VCF_VARIANT_FILTERING_GATK } from '../vcf_variant_filtering_gatk/main'
include { VCF_VARIANT_FILTERING_GATK as SENTIEON_HAPLOTYPER_VCF_VARIANT_FILTERING_GATK } from '../vcf_variant_filtering_gatk/main'



Expand Down Expand Up @@ -295,7 +296,7 @@ workflow BAM_VARIANT_CALLING_GERMLINE_ALL {
// If single sample track, check if filtering should be done
if (!(skip_tools && skip_tools.split(',').contains('haplotyper_filter'))) {

VCF_VARIANT_FILTERING_GATK(
SENTIEON_HAPLOTYPER_VCF_VARIANT_FILTERING_GATK(
vcf_sentieon_haplotyper.join(vcf_tbi_sentieon_haplotyper, failOnDuplicate: true, failOnMismatch: true),
fasta,
fasta_fai,
Expand All @@ -304,9 +305,9 @@ workflow BAM_VARIANT_CALLING_GERMLINE_ALL {
known_sites_indels.concat(known_sites_snps).flatten().unique().collect(),
known_sites_indels_tbi.concat(known_sites_snps_tbi).flatten().unique().collect())

vcf_sentieon_haplotyper = VCF_VARIANT_FILTERING_GATK.out.filtered_vcf
vcf_sentieon_haplotyper = SENTIEON_HAPLOTYPER_VCF_VARIANT_FILTERING_GATK.out.filtered_vcf

versions = versions.mix(VCF_VARIANT_FILTERING_GATK.out.versions)
versions = versions.mix(SENTIEON_HAPLOTYPER_VCF_VARIANT_FILTERING_GATK.out.versions)
}
}
}
Expand Down
44 changes: 44 additions & 0 deletions tests/test_sentieon_haplotyper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,47 @@
- path: results/variant_calling/sentieon_haplotyper/test/test.haplotyper.unfiltered.vcf.gz.tbi
- path: results/haplotyper
should_exist: false
- name: Run variant calling on germline sample with sentieons haplotyper and gatk haplotypecaller
command: nextflow run main.nf -profile test_cache,software_license,targeted --sentieon_extension --input ./tests/csv/3.0/mapped_single_bam.csv --tools haplotypecaller,sentieon_haplotyper --step variant_calling --outdir results
tags:
- germline
- sentieon/haplotyper
- variant_calling
files:
- path: results/csv/variantcalled.csv
md5sum: caa9932235cf993fca208943d2e58041
- path: results/multiqc
- path: results/preprocessing/converted/test/test.converted.cram
# binary changes md5sums on reruns
- path: results/preprocessing/converted/test/test.converted.cram.crai
# binary changes md5sums on reruns
- path: results/preprocessing/recalibrated/test/test.recal.cram
should_exist: false
- path: results/preprocessing/recalibrated/test/test.recal.cram.crai
should_exist: false
- path: results/reports/bcftools/sentieon_haplotyper/test/test.haplotyper.filtered.bcftools_stats.txt
md5sum: 66be03d4e6535175514f54a1a031d49f
- path: results/reports/vcftools/sentieon_haplotyper/test/test.haplotyper.filtered.FILTER.summary
md5sum: d501a93356f3c91c743f51104e24514a
- path: results/reports/vcftools/sentieon_haplotyper/test/test.haplotyper.filtered.TsTv.count
md5sum: 89562fef808b5c3db629682d36fd86fc
- path: results/reports/vcftools/sentieon_haplotyper/test/test.haplotyper.filtered.TsTv.qual
# changes md5sum on reruns. This is somewhat unexpected, but might to tiny variation in very small numbers in the qual-files.
- path: results/variant_calling/sentieon_haplotyper/test/test.haplotyper.filtered.vcf.gz
# binary changes md5sums on reruns
- path: results/variant_calling/sentieon_haplotyper/test/test.haplotyper.filtered.vcf.gz.tbi
# binary changes md5sums on reruns
- path: results/variant_calling/sentieon_haplotyper/test/test.haplotyper.unfiltered.vcf.gz
# binary changes md5sums on reruns
- path: results/variant_calling/sentieon_haplotyper/test/test.haplotyper.unfiltered.vcf.gz.tbi
# binary changes md5sums on reruns
- path: results/variant_calling/haplotypecaller/test/test.haplotypecaller.filtered.vcf.gz
# binary changes md5sums on reruns
- path: results/variant_calling/haplotypecaller/test/test.haplotypecaller.filtered.vcf.gz.tbi
# binary changes md5sums on reruns
- path: results/variant_calling/haplotypecaller/test/test.haplotypecaller.vcf.gz
# binary changes md5sums on reruns
- path: results/variant_calling/haplotypecaller/test/test.haplotypecaller.vcf.gz.tbi
# binary changes md5sums on reruns
- path: results/haplotyper
should_exist: false