@@ -546,6 +546,7 @@ process RunManta {
546546
547547 output :
548548 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
549550
550551 when : ' manta' in tools && ! params. onlyQC
551552
@@ -633,6 +634,54 @@ if (params.verbose) singleMantaOutput = singleMantaOutput.view {
633634 Index : ${ it[4].fileName} "
634635}
635636
637+
638+ process RunStrelkaBP {
639+ tag {idSampleTumor + " _vs_" + idSampleNormal}
640+
641+ publishDir directoryMap. strelkabp, mode : ' link'
642+
643+ input :
644+ set idPatient, idSampleNormal, file(bamNormal), file(baiNormal), idSampleTumor, file(bamTumor), file(baiTumor), file(mantaCSI), file(mantaCSIi) from mantaToStrelka
645+ set file(genomeFile), file(genomeIndex), file(genomeDict) from Channel . value([
646+ referenceMap. genomeFile,
647+ referenceMap. genomeIndex,
648+ referenceMap. genomeDict
649+ ])
650+
651+ output :
652+ set val(" strelkaBP" ), idPatient, idSampleNormal, idSampleTumor, file(" *.vcf.gz" ), file(" *.vcf.gz.tbi" ) into strelkaBPOutput
653+
654+ when : ' strelka' in tools && ' manta' in tools && params. strelkaBP && ! params. onlyQC
655+
656+ script :
657+ """
658+ \$ STRELKA_INSTALL_PATH/bin/configureStrelkaSomaticWorkflow.py \
659+ --tumor ${ bamTumor} \
660+ --normal ${ bamNormal} \
661+ --referenceFasta ${ genomeFile} \
662+ --indelCandidates ${ mantaCSI} \
663+ --runDir Strelka
664+
665+ python Strelka/runWorkflow.py -m local -j ${ task.cpus}
666+
667+ mv Strelka/results/variants/somatic.indels.vcf.gz \
668+ Strelka_${ idSampleTumor} _vs_${ idSampleNormal} _somatic_indels.vcf.gz
669+ mv Strelka/results/variants/somatic.indels.vcf.gz.tbi \
670+ Strelka_${ idSampleTumor} _vs_${ idSampleNormal} _somatic_indels.vcf.gz.tbi
671+ mv Strelka/results/variants/somatic.snvs.vcf.gz \
672+ Strelka_${ idSampleTumor} _vs_${ idSampleNormal} _somatic_snvs.vcf.gz
673+ mv Strelka/results/variants/somatic.snvs.vcf.gz.tbi \
674+ Strelka_${ idSampleTumor} _vs_${ idSampleNormal} _somatic_snvs.vcf.gz.tbi
675+ """
676+ }
677+
678+ if (params. verbose) strelkaBPOutput = strelkaBPOutput. view {
679+ " Variant Calling output:\n \
680+ Tool : ${ it[0]} \t ID : ${ it[1]} \t Sample: [${ it[3]} , ${ it[2]} ]\n \
681+ Files : ${ it[4].fileName} \n \
682+ Index : ${ it[5].fileName} "
683+ }
684+
636685// Run commands and code from Malin Larsson
637686// Based on Jesper Eisfeldt's code
638687process RunAlleleCount {
@@ -844,7 +893,8 @@ def defineDirectoryMap() {
844893 ' manta' : " ${ params.outDir} /VariantCalling/Manta" ,
845894 ' mutect1' : " ${ params.outDir} /VariantCalling/MuTect1" ,
846895 ' mutect2' : " ${ params.outDir} /VariantCalling/MuTect2" ,
847- ' strelka' : " ${ params.outDir} /VariantCalling/Strelka"
896+ ' strelka' : " ${ params.outDir} /VariantCalling/Strelka" ,
897+ ' strelkabp' : " ${ params.outDir} /VariantCalling/StrelkaBP"
848898 ]
849899}
850900
0 commit comments