Skip to content
This repository has been archived by the owner on Jan 27, 2020. It is now read-only.

Fix output directories #742

Merged
merged 5 commits into from
Mar 4, 2019
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ 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).

## [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

### `Added`
Expand Down
41 changes: 21 additions & 20 deletions germlineVC.nf
Original file line number Diff line number Diff line change
Expand Up @@ -249,21 +249,21 @@ 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

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])
Expand All @@ -284,22 +284,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])
Expand Down Expand Up @@ -331,8 +332,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}" : ""
"""
Expand Down Expand Up @@ -361,7 +362,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

Expand Down Expand Up @@ -405,7 +406,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

Expand Down
14 changes: 7 additions & 7 deletions somaticVC.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down