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

Commit 64184db

Browse files
author
Szilveszter Juhos
authored
Merge pull request #584 from MaxUlysse/Documentation
Fix Manta output
2 parents c5fa26e + 6b947c6 commit 64184db

2 files changed

Lines changed: 16 additions & 10 deletions

File tree

scripts/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@ then
115115
fi
116116

117117

118-
if [[ ALL,ANNOTATESNPEFF,ANNOTATEVEP =~ $TEST ]]
118+
if [[ ALL,ANNOTATEALL,ANNOTATESNPEFF,ANNOTATEVEP =~ $TEST ]]
119119
then
120120
if [[ $TEST = ANNOTATESNPEFF ]]
121121
then
122122
ANNOTATOR=snpEFF
123123
elif [[ $TEST = ANNOTATEVEP ]]
124124
then
125125
ANNOTATOR=VEP
126-
elif [[ $TEST = ALL ]]
126+
elif [[ ALL,ANNOTATEALL =~ $TEST ]]
127127
then
128128
ANNOTATOR=snpEFF,VEP
129129
fi

somaticVC.nf

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ bamsAll = bamsAll.map {
292292
}
293293

294294
// Manta and Strelka
295-
(bamsForManta, bamsForStrelka, bamsAll) = bamsAll.into(3)
295+
(bamsForManta, bamsForStrelka, bamsForStrelkaBP, bamsAll) = bamsAll.into(4)
296296

297297
bamsTumorNormalIntervals = bamsAll.spread(bedIntervals)
298298

@@ -532,11 +532,8 @@ if (params.verbose) strelkaOutput = strelkaOutput.view {
532532
process RunManta {
533533
tag {idSampleTumor + "_vs_" + idSampleNormal}
534534

535-
publishDir directoryMap.manta, mode: 'link',
536-
saveAs: {filename ->
537-
if (filename.endsWith(".bam") || filename.endsWith(".bai")) null
538-
else $filename
539-
}
535+
publishDir directoryMap.manta, mode: 'link'
536+
540537
input:
541538
set idPatient, idSampleNormal, file(bamNormal), file(baiNormal), idSampleTumor, file(bamTumor), file(baiTumor) from bamsForManta
542539
set file(genomeFile), file(genomeIndex) from Channel.value([
@@ -546,7 +543,7 @@ process RunManta {
546543

547544
output:
548545
set val("manta"), idPatient, idSampleNormal, idSampleTumor, file("*.vcf.gz"), file("*.vcf.gz.tbi") into mantaOutput
549-
set idPatient, idSampleNormal, file(bamNormal), file(baiNormal), idSampleTumor, file(bamTumor), file(baiTumor), file("*.candidateSmallIndels.vcf.gz"), file("*.candidateSmallIndels.vcf.gz.tbi") into mantaToStrelka
546+
set idPatient, idSampleNormal, idSampleTumor, file("*.candidateSmallIndels.vcf.gz"), file("*.candidateSmallIndels.vcf.gz.tbi") into mantaToStrelka
550547

551548
when: 'manta' in tools && !params.onlyQC
552549

@@ -634,14 +631,23 @@ if (params.verbose) singleMantaOutput = singleMantaOutput.view {
634631
Index : ${it[4].fileName}"
635632
}
636633

634+
// For easier joining, remaping channels to idPatient, idSampleNormal, idSampleTumor...
635+
636+
bamsForStrelkaBP = bamsForStrelkaBP.map {
637+
idPatientNormal, idSampleNormal, bamNormal, baiNormal, idSampleTumor, bamTumor, baiTumor ->
638+
[idPatientNormal, idSampleNormal, idSampleTumor, bamNormal, baiNormal, bamTumor, baiTumor]
639+
}.join(mantaToStrelka, by:[0,1,2]).map {
640+
idPatientNormal, idSampleNormal, idSampleTumor, bamNormal, baiNormal, bamTumor, baiTumor, mantaCSI, mantaCSIi ->
641+
[idPatientNormal, idSampleNormal, bamNormal, baiNormal, idSampleTumor, bamTumor, baiTumor, mantaCSI, mantaCSIi]
642+
}
637643

638644
process RunStrelkaBP {
639645
tag {idSampleTumor + "_vs_" + idSampleNormal}
640646

641647
publishDir directoryMap.strelkabp, mode: 'link'
642648

643649
input:
644-
set idPatient, idSampleNormal, file(bamNormal), file(baiNormal), idSampleTumor, file(bamTumor), file(baiTumor), file(mantaCSI), file(mantaCSIi) from mantaToStrelka
650+
set idPatient, idSampleNormal, file(bamNormal), file(baiNormal), idSampleTumor, file(bamTumor), file(baiTumor), file(mantaCSI), file(mantaCSIi) from bamsForStrelkaBP
645651
set file(genomeFile), file(genomeIndex), file(genomeDict) from Channel.value([
646652
referenceMap.genomeFile,
647653
referenceMap.genomeIndex,

0 commit comments

Comments
 (0)