Skip to content
Snippets Groups Projects
Commit dd97cb46 authored by Cats's avatar Cats
Browse files

docker added for somatic variantcallers

parent 34d0d144
No related branches found
No related tags found
1 merge request!98docker added for somatic variantcallers
......@@ -2,7 +2,7 @@ version 1.0
import "common.wdl"
task ConfigureSomatic {
task Somatic {
input {
IndexedBamFile tumorBam
IndexedBamFile? normalBam
......@@ -11,48 +11,28 @@ task ConfigureSomatic {
File? callRegions
File? callRegionsIndex
Boolean exome = false
String? preCommand
String? installDir
}
String toolCommand = if defined(installDir)
then installDir + "bin/configMata.py"
else "configManta.py"
Int cores = 1
Int memory = 4
String dockerTag = "1.4.0--py27_1"
File? doNotDefineThis #FIXME
}
String normalArg = if (defined(normalBam))
then "--normalBam " + select_first([normalBam]).file
else ""
File? normalBamFile = if defined(normalBam)
then select_first([normalBam]).file
else doNotDefineThis
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
~{normalArg} \
set -e
configManta.py \
~{"--normalBam " + normalBamFile} \
~{"--tumorBam " + tumorBam.file} \
--referenceFasta ~{reference.fasta} \
~{"--callRegions " + callRegions} \
--runDir ~{runDir} \
~{true="--exome" false="" exome}
}
output {
String runDirectory = runDir
}
}
task RunSomatic {
input {
String? preCommand
String runDir
Boolean paired = true
Int cores = 1
Int memory = 4
}
command {
set -e -o pipefail
~{preCommand}
~{runDir}/runWorkflow.py \
-m local \
-j ~{cores} \
......@@ -60,7 +40,7 @@ task RunSomatic {
}
output {
IndexedVcfFile condidateSmallIndels = object {
IndexedVcfFile candidateSmallIndels = object {
file: runDir + "/results/variants/candidateSmallIndels.vcf.gz",
index: runDir + "/results/variants/candidateSmallIndels.vcf.gz.tbi"
}
......@@ -68,7 +48,7 @@ task RunSomatic {
file: runDir + "/results/variants/candidateSV.vcf.gz",
index: runDir + "/results/variants/candidateSV.vcf.gz.tbi"
}
IndexedVcfFile tumorSV = if (paired)
IndexedVcfFile tumorSV = if defined(normalBam)
then object {
file: runDir + "/results/variants/somaticSV.vcf.gz",
index: runDir + "/results/variants/somaticSV.vcf.gz.tbi"
......@@ -86,5 +66,6 @@ task RunSomatic {
runtime {
cpu: cores
memory: memory
docker: "quay.io/biocontainers/manta:" + dockerTag
}
}
\ No newline at end of file
}
......@@ -318,6 +318,7 @@ task MergeVCFs {
command {
set -e
mkdir -p $(dirname ~{outputVcfPath})
picard -Xmx~{memory}G \
MergeVcfs \
INPUT=~{sep=' INPUT=' inputVCFs} \
......@@ -419,6 +420,7 @@ task SortVcf {
command {
set -e
mkdir -p $(dirname ~{outputVcfPath})
picard -Xmx~{memory}G \
SortVcf \
I=~{sep=" I=" vcfFiles} \
......
......@@ -2,10 +2,8 @@ version 1.0
import "common.wdl" as common
task ConfigureGermline {
task Germline {
input {
String? preCommand
String? installDir
String runDir
Array[File]+ bams
Array[File]+ indexes
......@@ -14,33 +12,42 @@ task ConfigureGermline {
File? callRegionsIndex
Boolean exome = false
Boolean rna = false
}
String toolCommand = if defined(installDir)
then installDir + "bin/configureStrelkaGermlineWorkflow.py"
else "configureStrelkaGermlineWorkflow.py"
Int cores = 1
Int memory = 4
String dockerTag = "2.9.7--0"
}
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
set -e
configureStrelkaGermlineWorkflow.py \
--bam ~{sep=" --bam " bams} \
--ref ~{reference.fasta} \
--runDir ~{runDir} \
~{"--callRegions " + callRegions} \
~{true="--exome" false="" exome} \
~{true="--rna" false="" rna}
~{runDir}/runWorkflow.py \
-m local \
-j ~{cores} \
-g ~{memory}
}
output {
String runDirectory = runDir
File variants = runDir + "/results/variants/variants.vcf.gz"
File variantsIndex = runDir + "/results/variants/variants.vcf.gz.tbi"
}
runtime {
docker: "quay.io/biocontainers/strelka:" + dockerTag
cpu: cores
memory: memory
}
}
task ConfigureSomatic {
task Somatic {
input {
String? preCommand
String? installDir
String runDir
IndexedBamFile normalBam
IndexedBamFile tumorBam
......@@ -49,46 +56,29 @@ task ConfigureSomatic {
File? callRegionsIndex
IndexedVcfFile? indelCandidates
Boolean exome = false
}
String toolCommand = if defined(installDir)
then installDir + "bin/configureStrelkaSomaticWorkflow.py"
else "configureStrelkaSomaticWorkflow.py"
Int cores = 1
Int memory = 4
String dockerTag = "2.9.7--0"
File? doNotDefineThis #FIXME
}
String indelCandidatesArg = if (defined(indelCandidates))
then "--indelCandidates " + select_first([indelCandidates]).file
else ""
File? indelCandidatesFile = if (defined(indelCandidates))
then select_first([indelCandidates]).file
else doNotDefineThis
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
set -e
configureStrelkaSomaticWorkflow.py \
--normalBam ~{normalBam.file} \
--tumorBam ~{tumorBam.file} \
--ref ~{reference.fasta} \
--runDir ~{runDir} \
~{"--callRegions " + callRegions} \
~{indelCandidatesArg} \
~{true="--exome" false="" exome} \
}
output {
String runDirectory = runDir
}
}
task Run {
input {
String? preCommand
String runDir
Int cores = 1
Int memory = 4
Boolean somatic = true
}
~{"--indelCandidates " + indelCandidatesFile} \
~{true="--exome" false="" exome}
command {
set -e -o pipefail
~{preCommand}
~{runDir}/runWorkflow.py \
-m local \
-j ~{cores} \
......@@ -96,17 +86,14 @@ task Run {
}
output {
File? indelsVcf = runDir + "/results/variants/somatic.indels.vcf.gz"
File? indelsIndex = runDir + "/results/variants/somatic.indels.vcf.gz.tbi"
File variants = if somatic
then runDir + "/results/variants/somatic.snvs.vcf.gz"
else runDir + "/results/variants/variants.vcf.gz"
File variantsIndex = if somatic
then runDir + "/results/variants/somatic.snvs.vcf.gz.tbi"
else runDir + "/results/variants/variants.vcf.gz.tbi"
File indelsVcf = runDir + "/results/variants/somatic.indels.vcf.gz"
File indelsIndex = runDir + "/results/variants/somatic.indels.vcf.gz.tbi"
File variants = runDir + "/results/variants/somatic.snvs.vcf.gz"
File variantsIndex = runDir + "/results/variants/somatic.snvs.vcf.gz.tbi"
}
runtime {
docker: "quay.io/biocontainers/strelka:" + dockerTag
cpu: cores
memory: memory
}
......
......@@ -4,9 +4,6 @@ import "common.wdl"
task VarDict {
input {
String? installDir
Boolean useJavaVersion = true
String tumorSampleName
IndexedBamFile tumorBam
String? normalSampleName
......@@ -20,52 +17,43 @@ task VarDict {
Int endColumn = 3
Int geneColumn = 4
String? preCommand
Int memory = 8
Float memoryMultiplier = 2.0
}
String dockerTag = "1.5.8--1"
String normalArg = if (defined(normalBam))
then "|" + select_first([normalBam]).file
else ""
File? doNotDefineThis #FIXME
}
String toolCommand = if defined(installDir)
then installDir + "/VarDict"
else if useJavaVersion
then "vardict-java"
else "vardict"
File? normalBamFile = if defined(normalBam)
then select_first([normalBam]).file
else doNotDefineThis
command {
set -e -o pipefail
export JAVA_OPTS="-Xmx~{memory}G"
~{preCommand}
~{toolCommand} \
vardict-java \
-G ~{reference.fasta} \
-N ~{tumorSampleName} \
-b "~{tumorBam.file}~{normalArg}" \
-b "~{tumorBam.file}~{"|" + normalBamFile}" \
~{true="" false="-z" defined(normalBam)} \
-c ~{chromosomeColumn} \
-S ~{startColumn} \
-E ~{endColumn} \
-g ~{geneColumn} \
~{bedFile} | \
~{installDir + "/"}~{true="testsomatic.R" false="teststrandbias.R" defined(normalBam)} | \
~{installDir + "/"}~{true="var2vcf_paired.pl"
false="var2vcf_valid.pl" defined(normalBam)} \
~{true="testsomatic.R" false="teststrandbias.R" defined(normalBam)} | \
~{true="var2vcf_paired.pl" false="var2vcf_valid.pl" defined(normalBam)} \
-N "~{tumorSampleName}~{"|" + normalSampleName}" \
~{true="" false="-E" defined(normalBam)} | \
bgzip -c > ~{outputVcf}
tabix -p vcf ~{outputVcf}
~{true="" false="-E" defined(normalBam)} \
> ~{outputVcf}
}
output {
IndexedVcfFile vcfFile = object {
file: outputVcf,
index: outputVcf + ".tbi"
}
File vcfFile = outputVcf
}
runtime {
memory: ceil(memory * memoryMultiplier)
docker: "quay.io/biocontainers/vardict-java:" + dockerTag
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment