From 8693c1b26ab1e1b9a1e859fdc9cc0638159f4ae9 Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Thu, 28 Feb 2019 09:29:32 +0100 Subject: [PATCH 1/4] add Unreleased --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3fd8fbcb..06413d8d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [Unreleased] + ## [2.3] - Äpar - 2019-02-27 ### `Added` From aa24da650afd072db0dd1defdf826688a59b0feb Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Mon, 4 Mar 2019 10:16:24 +0100 Subject: [PATCH 2/4] fix output dirs --- germlineVC.nf | 43 +++++++++++++++++++++++-------------------- somaticVC.nf | 14 +++++++------- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/germlineVC.nf b/germlineVC.nf index 4a1d470f4..5bd468853 100644 --- a/germlineVC.nf +++ b/germlineVC.nf @@ -91,6 +91,8 @@ if (params.verbose) bamFiles = bamFiles.view { Files : [${it[3].fileName}, ${it[4].fileName}]" } +if (mode == "germline") return [ idPatient, status, idSample, bamFile, baiFile ] + // assume input is recalibrated, ignore explicitBqsrNeeded (recalibratedBam, recalTables) = bamFiles.into(2) @@ -249,7 +251,7 @@ process RunHaplotypecaller { ]) output: - set val("gvcf-hc"), idPatient, idSample, idSample, file("${intervalBed.baseName}_${idSample}.g.vcf") into hcGenomicVCF + set val("HaplotypeCallerGVCF"), idPatient, idSample, idSample, file("${intervalBed.baseName}_${idSample}.g.vcf") into hcGenomicVCF set idPatient, idSample, file(intervalBed), file("${intervalBed.baseName}_${idSample}.g.vcf") into vcfsToGenotype when: 'haplotypecaller' in tools && !params.onlyQC @@ -257,13 +259,13 @@ process RunHaplotypecaller { script: """ gatk --java-options "-Xmx${task.memory.toGiga()}g -Xms6000m -XX:GCTimeLimit=50 -XX:GCHeapFreeLimit=10" \ - HaplotypeCaller \ - -R ${genomeFile} \ - -I ${bam} \ - -L ${intervalBed} \ - --dbsnp ${dbsnp} \ - -O ${intervalBed.baseName}_${idSample}.g.vcf \ - --emit-ref-confidence GVCF + HaplotypeCaller \ + -R ${genomeFile} \ + -I ${bam} \ + -L ${intervalBed} \ + -D ${dbsnp} \ + -O ${intervalBed.baseName}_${idSample}.g.vcf \ + -ERC GVCF """ } hcGenomicVCF = hcGenomicVCF.groupTuple(by:[0,1,2,3]) @@ -284,22 +286,23 @@ process RunGenotypeGVCFs { ]) output: - set val("haplotypecaller"), idPatient, idSample, idSample, file("${intervalBed.baseName}_${idSample}.vcf") into hcGenotypedVCF + set val("HaplotypeCaller"), idPatient, idSample, idSample, file("${intervalBed.baseName}_${idSample}.vcf") into hcGenotypedVCF when: 'haplotypecaller' in tools && !params.onlyQC script: // Using -L is important for speed and we have to index the interval files also """ - gatk IndexFeatureFile -F ${gvcf} + gatk --java-options -Xmx${task.memory.toGiga()}g \ + IndexFeatureFile -F ${gvcf} gatk --java-options -Xmx${task.memory.toGiga()}g \ - GenotypeGVCFs \ - -R ${genomeFile} \ - -L ${intervalBed} \ - --dbsnp ${dbsnp} \ - -V ${gvcf} \ - -O ${intervalBed.baseName}_${idSample}.vcf + GenotypeGVCFs \ + -R ${genomeFile} \ + -L ${intervalBed} \ + -D ${dbsnp} \ + -V ${gvcf} \ + -O ${intervalBed.baseName}_${idSample}.vcf """ } hcGenotypedVCF = hcGenotypedVCF.groupTuple(by:[0,1,2,3]) @@ -331,8 +334,8 @@ process ConcatVCF { when: ( 'haplotypecaller' in tools || 'mutect2' in tools || 'freebayes' in tools ) && !params.onlyQC script: - if (variantCaller == 'haplotypecaller') outputFile = "${variantCaller}_${idSampleNormal}.vcf" - else if (variantCaller == 'gvcf-hc') outputFile = "haplotypecaller_${idSampleNormal}.g.vcf" + if (variantCaller == 'HaplotypeCaller') outputFile = "${variantCaller}_${idSampleNormal}.vcf" + else if (variantCaller == 'HaplotypeCallerGVCF') outputFile = "haplotypecaller_${idSampleNormal}.g.vcf" else outputFile = "${variantCaller}_${idSampleTumor}_vs_${idSampleNormal}.vcf" options = params.targetBED ? "-t ${targetBED}" : "" """ @@ -361,7 +364,7 @@ process RunSingleStrelka { ]) output: - set val("singlestrelka"), idPatient, idSample, file("*.vcf.gz"), file("*.vcf.gz.tbi") into singleStrelkaOutput + set val("Strelka"), idPatient, idSample, file("*.vcf.gz"), file("*.vcf.gz.tbi") into singleStrelkaOutput when: 'strelka' in tools && !params.onlyQC @@ -405,7 +408,7 @@ process RunSingleManta { ]) output: - set val("singlemanta"), idPatient, idSample, file("*.vcf.gz"), file("*.vcf.gz.tbi") into singleMantaOutput + set val("Manta"), idPatient, idSample, file("*.vcf.gz"), file("*.vcf.gz.tbi") into singleMantaOutput when: 'manta' in tools && status == 0 && !params.onlyQC diff --git a/somaticVC.nf b/somaticVC.nf index baf211147..fdce50901 100644 --- a/somaticVC.nf +++ b/somaticVC.nf @@ -212,7 +212,7 @@ process RunMutect2 { ]) output: - set val("mutect2"), idPatient, idSampleNormal, idSampleTumor, file("${intervalBed.baseName}_${idSampleTumor}_vs_${idSampleNormal}.vcf") into mutect2Output + set val("MuTect2"), idPatient, idSampleNormal, idSampleTumor, file("${intervalBed.baseName}_${idSampleTumor}_vs_${idSampleNormal}.vcf") into mutect2Output when: 'mutect2' in tools && !params.onlyQC @@ -242,7 +242,7 @@ process RunFreeBayes { file(genomeIndex) from Channel.value(referenceMap.genomeIndex) output: - set val("freebayes"), idPatient, idSampleNormal, idSampleTumor, file("${intervalBed.baseName}_${idSampleTumor}_vs_${idSampleNormal}.vcf") into freebayesOutput + set val("FreeBayes"), idPatient, idSampleNormal, idSampleTumor, file("${intervalBed.baseName}_${idSampleTumor}_vs_${idSampleNormal}.vcf") into freebayesOutput when: 'freebayes' in tools && !params.onlyQC @@ -322,7 +322,7 @@ process RunStrelka { ]) output: - set val("strelka"), idPatient, idSampleNormal, idSampleTumor, file("*.vcf.gz"), file("*.vcf.gz.tbi") into strelkaOutput + set val("Strelka"), idPatient, idSampleNormal, idSampleTumor, file("*.vcf.gz"), file("*.vcf.gz.tbi") into strelkaOutput when: 'strelka' in tools && !params.onlyQC @@ -367,7 +367,7 @@ process RunManta { ]) output: - set val("manta"), idPatient, idSampleNormal, idSampleTumor, file("*.vcf.gz"), file("*.vcf.gz.tbi") into mantaOutput + set val("Manta"), idPatient, idSampleNormal, idSampleTumor, file("*.vcf.gz"), file("*.vcf.gz.tbi") into mantaOutput set idPatient, idSampleNormal, idSampleTumor, file("*.candidateSmallIndels.vcf.gz"), file("*.candidateSmallIndels.vcf.gz.tbi") into mantaToStrelka when: 'manta' in tools && !params.onlyQC @@ -426,7 +426,7 @@ process RunSingleManta { ]) output: - set val("singlemanta"), idPatient, idSample, file("*.vcf.gz"), file("*.vcf.gz.tbi") into singleMantaOutput + set val("Manta"), idPatient, idSample, file("*.vcf.gz"), file("*.vcf.gz.tbi") into singleMantaOutput when: 'manta' in tools && status == 1 && !params.onlyQC @@ -491,7 +491,7 @@ process RunStrelkaBP { ]) output: - set val("strelkaBP"), idPatient, idSampleNormal, idSampleTumor, file("*.vcf.gz"), file("*.vcf.gz.tbi") into strelkaBPOutput + set val("Strelka"), idPatient, idSampleNormal, idSampleTumor, file("*.vcf.gz"), file("*.vcf.gz.tbi") into strelkaBPOutput when: 'strelka' in tools && 'manta' in tools && params.strelkaBP && !params.onlyQC @@ -605,7 +605,7 @@ process RunAscat { file(acLociGC) from Channel.value([referenceMap.acLociGC]) output: - set val("ascat"), idPatient, idSampleNormal, idSampleTumor, file("${idSampleTumor}.*.{png,txt}") into ascatOutput + set val("ASCAT"), idPatient, idSampleNormal, idSampleTumor, file("${idSampleTumor}.*.{png,txt}") into ascatOutput when: 'ascat' in tools && !params.onlyQC From 1a944f15f68a4b7f629b2a284dfd443e2ba6feb0 Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Mon, 4 Mar 2019 10:21:44 +0100 Subject: [PATCH 3/4] update CHANGELOG --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06413d8d8..b36db1307 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [2.3.FIX1] - 2019-03-04 + +### `Fixed` +- [#742](https://github.com/SciLifeLab/Sarek/pull/742) - Fix output dirs (HaplotypeCaller that was not recognized by annotate.nf introduced by [#728](https://github.com/SciLifeLab/Sarek/pull/728)) ## [2.3] - Äpar - 2019-02-27 From 8ca019403017ff18b18b53c8109b16ee4a278740 Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Mon, 4 Mar 2019 10:24:38 +0100 Subject: [PATCH 4/4] remove comments --- germlineVC.nf | 2 -- 1 file changed, 2 deletions(-) diff --git a/germlineVC.nf b/germlineVC.nf index 5bd468853..e3d002ebc 100644 --- a/germlineVC.nf +++ b/germlineVC.nf @@ -91,8 +91,6 @@ if (params.verbose) bamFiles = bamFiles.view { Files : [${it[3].fileName}, ${it[4].fileName}]" } -if (mode == "germline") return [ idPatient, status, idSample, bamFile, baiFile ] - // assume input is recalibrated, ignore explicitBqsrNeeded (recalibratedBam, recalTables) = bamFiles.into(2)