From 6eb3284fc8eb232dfcaf920b9a49acd58e952469 Mon Sep 17 00:00:00 2001 From: asp8200 Date: Mon, 14 Aug 2023 16:28:13 +0000 Subject: [PATCH 1/3] Remove sentieon BQSR --- conf/modules/align_sentieon.config | 3 - modules/local/sentieon/bqsr.nf | 88 ------------------- .../local/alignment/align_sentieon.nf | 20 ----- 3 files changed, 111 deletions(-) delete mode 100644 modules/local/sentieon/bqsr.nf diff --git a/conf/modules/align_sentieon.config b/conf/modules/align_sentieon.config index e3dd1cc2..b39bad3c 100644 --- a/conf/modules/align_sentieon.config +++ b/conf/modules/align_sentieon.config @@ -45,7 +45,4 @@ process { ] } - withName: '.*ALIGN:ALIGN_SENTIEON:SENTIEON_BQSR' { - ext.prefix = { "${meta.id}_bqsr" } - } } diff --git a/modules/local/sentieon/bqsr.nf b/modules/local/sentieon/bqsr.nf deleted file mode 100644 index 390108e1..00000000 --- a/modules/local/sentieon/bqsr.nf +++ /dev/null @@ -1,88 +0,0 @@ -process SENTIEON_BQSR { - tag "$meta.id" - label 'process_high' - label 'sentieon' - - secret 'SENTIEON_LICENSE_BASE64' - - input: - tuple val(meta), path(bam), path(bai) - tuple val(meta2), path(fasta) - tuple val(meta3), path(fai) - tuple val(meta4), path(known_dbsnp) - tuple val(meta5), path(known_dbsnp_tbi) - - output: - tuple val(meta), path('*.bam') , emit: bam - tuple val(meta), path('*.bam.bai') , emit: bai - tuple val(meta), path('*.table') , emit: recal_pre - tuple val(meta), path('*.table_post'), emit: recal_post - tuple val(meta), path('*.csv') , emit: recal_csv - path "versions.yml" , emit: versions - - when: - task.ext.when == null || task.ext.when - - script: - def args = task.ext.args ?: '' - def args2 = task.ext.args2 ?: '' - def args3 = task.ext.args3 ?: '' - def dbsnp = known_dbsnp ? "-k $known_dbsnp" : '' - def prefix = task.ext.prefix ?: "${meta.id}" - def input = bam.sort().collect{"-i $it"}.join(' ') - """ - if [ \${SENTIEON_LICENSE_BASE64:-"unset"} != "unset" ]; then - echo "Initializing SENTIEON_LICENSE env variable" - source sentieon_init.sh SENTIEON_LICENSE_BASE64 - fi - - sentieon driver \\ - -t ${task.cpus} \\ - -r $fasta \\ - $args \\ - $input \\ - --algo QualCal \\ - $dbsnp \\ - ${prefix}.table - - sentieon driver \\ - -t ${task.cpus} \\ - -r $fasta \\ - $args2 \\ - $input \\ - -q ${prefix}.table \\ - --algo QualCal \\ - $dbsnp \\ - ${prefix}.table_post \\ - --algo ReadWriter ${prefix}.bam - - sentieon driver \\ - -t ${task.cpus} \\ - $args3 \\ - --algo QualCal \\ - --plot \\ - --before ${prefix}.table \\ - --after ${prefix}.table_post \\ - ${prefix}.csv - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") - END_VERSIONS - """ - - stub: - def prefix = task.ext.prefix ?: "${meta.id}" - """ - touch ${prefix}.bam - touch ${prefix}.bam.bai - touch ${prefix}.table - touch ${prefix}.table_post - touch ${prefix}.csv - - cat <<-END_VERSIONS > versions.yml - "${task.process}": - sentieon: \$(echo \$(sentieon driver --version 2>&1) | sed -e "s/sentieon-genomics-//g") - END_VERSIONS - """ -} diff --git a/subworkflows/local/alignment/align_sentieon.nf b/subworkflows/local/alignment/align_sentieon.nf index b7387a44..86447e81 100644 --- a/subworkflows/local/alignment/align_sentieon.nf +++ b/subworkflows/local/alignment/align_sentieon.nf @@ -5,7 +5,6 @@ include { SENTIEON_BWAMEM } from '../../../modules/nf-core/sentieon/bwamem/main' include { SENTIEON_DATAMETRICS } from '../../../modules/nf-core/sentieon/datametrics/main' include { SENTIEON_DEDUP } from '../../../modules/nf-core/sentieon/dedup/main' -include { SENTIEON_BQSR } from '../../../modules/local/sentieon/bqsr' include { SENTIEON_READWRITER } from '../../../modules/nf-core/sentieon/readwriter/main' workflow ALIGN_SENTIEON { take: @@ -13,15 +12,10 @@ workflow ALIGN_SENTIEON { ch_genome_fasta // channel: [mandatory] [ val(meta), path(fasta) ] ch_genome_fai // channel: [mandatory] [ val(meta), path(fai) ] ch_bwa_index // channel: [mandatory] [ val(meta), path(bwa_index) ] - ch_known_dbsnp // channel: [optional] [ path(known_dbsnp) ] - ch_known_dbsnp_tbi // channel: [optional] [ path(known_dbsnp_tbi) ] val_platform // string: [mandatory] default: illumina main: ch_versions = Channel.empty() - ch_bqsr_bam = Channel.empty() - ch_bqsr_bai = Channel.empty() - ch_bqsr_csv = Channel.empty() SENTIEON_BWAMEM ( ch_reads_input, ch_bwa_index, ch_genome_fasta.map{ meta, fasta -> fasta }, ch_genome_fai.map{ meta, fai -> fai }) @@ -46,17 +40,6 @@ workflow ALIGN_SENTIEON { SENTIEON_DEDUP ( ch_bam_bai, ch_genome_fasta, ch_genome_fai ) - if (params.variant_caller == "sentieon") { - SENTIEON_DEDUP.out.bam - .join(SENTIEON_DEDUP.out.bai, failOnMismatch:true, failOnDuplicate:true) - .set { ch_dedup_bam_bai } - SENTIEON_BQSR ( ch_dedup_bam_bai, ch_genome_fasta, ch_genome_fai, ch_known_dbsnp, ch_known_dbsnp_tbi ) - ch_bqsr_bam = SENTIEON_BQSR.out.bam - ch_bqsr_bai = SENTIEON_BQSR.out.bai - ch_bqsr_csv = SENTIEON_BQSR.out.recal_csv - ch_versions = ch_versions.mix(SENTIEON_BQSR.out.versions.first()) - } - ch_versions = ch_versions.mix(SENTIEON_BWAMEM.out.versions.first()) ch_versions = ch_versions.mix(SENTIEON_DATAMETRICS.out.versions.first()) ch_versions = ch_versions.mix(SENTIEON_DEDUP.out.versions.first()) @@ -64,9 +47,6 @@ workflow ALIGN_SENTIEON { emit: marked_bam = SENTIEON_DEDUP.out.bam // channel: [ val(meta), path(bam) ] marked_bai = SENTIEON_DEDUP.out.bai // channel: [ val(meta), path(bai) ] - recal_bam = ch_bqsr_bam.ifEmpty(null) // channel: [ val(meta), path(bam) ] - recal_bai = ch_bqsr_bai.ifEmpty(null) // channel: [ val(meta), path(bai) ] - recal_csv = ch_bqsr_csv.ifEmpty(null) // channel: [ val(meta), path(csv) ] mq_metrics = SENTIEON_DATAMETRICS.out.mq_metrics.ifEmpty(null) // channel: [ val(meta), path(mq_metrics) ] qd_metrics = SENTIEON_DATAMETRICS.out.qd_metrics.ifEmpty(null) // channel: [ val(meta), path(qd_metrics) ] gc_metrics = SENTIEON_DATAMETRICS.out.gc_metrics.ifEmpty(null) // channel: [ val(meta), path(gc_metrics) ] From ef8f621f2580f1acea51463cd685535a9b183d6c Mon Sep 17 00:00:00 2001 From: asp8200 Date: Mon, 14 Aug 2023 16:46:18 +0000 Subject: [PATCH 2/3] Removing dbsnp as argument to ALIGN and ALIGN_SENTIEON --- subworkflows/local/align.nf | 4 ---- workflows/raredisease.nf | 2 -- 2 files changed, 6 deletions(-) diff --git a/subworkflows/local/align.nf b/subworkflows/local/align.nf index bab66216..3455c3b9 100644 --- a/subworkflows/local/align.nf +++ b/subworkflows/local/align.nf @@ -13,8 +13,6 @@ workflow ALIGN { ch_genome_fai // channel: [mandatory] [ val(meta), path(fai) ] ch_bwa_index // channel: [mandatory] [ val(meta), path(index) ] ch_bwamem2_index // channel: [mandatory] [ val(meta), path(index) ] - ch_known_dbsnp // channel: [optional; used by sentieon] [ path(known_dbsnp) ] - ch_known_dbsnp_tbi // channel: [optional; used by sentieon] [ path(known_dbsnp_tbi) ] val_platform // string: [mandatory] illumina or a different technology main: @@ -33,8 +31,6 @@ workflow ALIGN { ch_genome_fasta, ch_genome_fai, ch_bwa_index, - ch_known_dbsnp, - ch_known_dbsnp_tbi, val_platform ) diff --git a/workflows/raredisease.nf b/workflows/raredisease.nf index abd34e39..0704b202 100644 --- a/workflows/raredisease.nf +++ b/workflows/raredisease.nf @@ -300,8 +300,6 @@ workflow RAREDISEASE { ch_genome_fai, ch_genome_bwaindex, ch_genome_bwamem2index, - ch_dbsnp, - ch_dbsnp_tbi, params.platform ) .set { ch_mapped } From bf5e5ea7eebff673ceab5f693fb5502d9b2b2e08 Mon Sep 17 00:00:00 2001 From: asp8200 Date: Mon, 14 Aug 2023 17:04:48 +0000 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 487d77c1..e7e1480a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Installed the nf-core version of the sentieon/readwriter module [#399](https://github.com/nf-core/raredisease/pull/399) - Installed the nf-core version of the sentieon/datametrics module [#400](https://github.com/nf-core/raredisease/pull/400) - Installed the nf-core version of the sentieon/dedup module. The dedup module also contains a call to Sentieon's LocusCollector [#401](https://github.com/nf-core/raredisease/pull/401) +- Removing Sentieon-based BQSR. Recent Illumina sequencers tend to provide well-calibrated BQs, so BQSR may not provide much benefit [#402](https://github.com/nf-core/raredisease/pull/402) ### `Fixed`