From 4165b91d847c1fdc461c2142e0f97b42b4aa849b Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Thu, 31 Jan 2019 10:08:06 +0100 Subject: [PATCH 1/2] remove old unused channels, and do the QC on the recalibrated bams --- main.nf | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/main.nf b/main.nf index 866221bdfa..c96b4cf82e 100644 --- a/main.nf +++ b/main.nf @@ -379,15 +379,6 @@ if (params.verbose) recalibrationTable = recalibrationTable.view { Files : [${it[3].fileName}, ${it[4].fileName}, ${it[5].fileName}]" } -(bamForBamQC, bamForSamToolsStats, recalTables, recalibrationTableForHC, recalibrationTable) = recalibrationTable.into(5) - -// Remove recalTable from Channels to match inputs for Process to avoid: -// WARN: Input tuple does not match input set cardinality declared by process... -bamForBamQC = bamForBamQC.map { it[0..4] } -bamForSamToolsStats = bamForSamToolsStats.map{ it[0..4] } - -recalTables = recalTables.map { [it[0]] + it[2..-1] } // remove status - process RecalibrateBam { tag {idPatient + "-" + idSample} @@ -406,8 +397,6 @@ process RecalibrateBam { set idPatient, status, idSample, file("${idSample}.recal.bam"), file("${idSample}.recal.bai") into recalibratedBam, recalibratedBamForStats set idPatient, status, idSample, val("${idSample}.recal.bam"), val("${idSample}.recal.bai") into recalibratedBamTSV - // GATK4 HaplotypeCaller can not do BQSR on the fly, so we have to create a - // recalibrated BAM explicitly. when: !params.onlyQC script: @@ -436,6 +425,10 @@ if (params.verbose) recalibratedBam = recalibratedBam.view { Files : [${it[3].fileName}, ${it[4].fileName}]" } +// Remove recalTable from Channels to match inputs for Process to avoid: +// WARN: Input tuple does not match input set cardinality declared by process... +(bamForBamQC, bamForSamToolsStats) = recalibratedBamForStats.map{ it[0..4] }.into(2) + process RunSamtoolsStats { tag {idPatient + "-" + idSample} From 974c810361a7adacd1daf5ff4a6ed386dc7b5c6f Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Thu, 31 Jan 2019 10:14:19 +0100 Subject: [PATCH 2/2] update CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d39de4fd2..ee38b4d9b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### `Removed` - [#715](https://github.com/SciLifeLab/Sarek/pull/715) - Remove `defReferencesFiles` function from `buildReferences.nf` +### `Fixed` +- [#720](https://github.com/SciLifeLab/Sarek/pull/720) - bamQC is now run on the recalibrated bams, and not after MarkDuplicates + ## [2.2.2] - 2018-12-19 ### `Added`