Skip to content
Snippets Groups Projects
Commit 4bb4290c authored by cedrick's avatar cedrick
Browse files

Merge branch 'add_sv_tasks' of https://github.com/biowdl/tasks into add_sv_tasks

parents 259cc599 338f8533
No related branches found
No related tags found
No related merge requests found
......@@ -4,19 +4,20 @@ task Bcf2Vcf {
input {
File bcf
String outputPath
String dockerImage = "quay.io/biocontainers/bcftools:1.9--ha228f0b_3"
}
command {
set -e
mkdir -p "$(dirname ~{outputPath})"
bcftools view ~{bcf} -O v -o ~{outputPath}
}
output {
File outputVcf = outputPath
}
runtime {
docker: dockerImage
}
......
......@@ -2,13 +2,17 @@ version 1.0
import "bwa.wdl"
task Prediction {
task Mateclever {
input {
File bamFile
File bamIndex
File fiteredBam
File indexedFiteredBam
BwaIndex bwaIndex
File predictions
String outputPath
Int cleverMaxDelLength = 100000
Int maxLengthDiff= 30
Int maxOffset = 150
Int threads = 10
String memory = "15G"
String dockerImage = "quay.io/biocontainers/clever-toolkit:2.4--py36hcfe0e84_6"
......@@ -17,18 +21,21 @@ task Prediction {
command {
set -e
mkdir -p "$(dirname ~{outputPath})"
clever \
echo ~{outputPath} ~{fiteredBam} ~{predictions} none > predictions.list
mateclever \
-T ~{threads} \
--use_mapq \
--sorted \
-k \
-f \
~{bamFile} \
-M ~{cleverMaxDelLength} \
-z ~{maxLengthDiff} \
-o ~{maxOffset} \
~{bwaIndex.fastaFile} \
predictions.list \
~{outputPath}
}
output {
File predictions = outputPath + "/predictions.vcf"
File matecleverVcf = outputPath + "/deletions.vcf"
}
runtime {
......@@ -39,26 +46,26 @@ task Prediction {
parameter_meta {
# inputs
bamFile: {description: "The bam file to process.", category: "required"}
bamIndex: {description: "The index bam file.", category: "required"}
fiteredBam: {description: "The bam file where sequences less than 30bp were removed.", category: "required"}
indexedFiteredBam: {description: "The index of the filtered bam file.", category: "required"}
bwaIndex: {description: "The BWA index files.", category: "required"}
predictions: {description: "The predicted deletions (VCF) from clever.", category: "required"}
outputPath: {description: "The location the output VCF file should be written.", category: "common"}
threads: {description: "The the number of threads required to run a program", category: "advanced"}
memory: {description: "The memory required to run the programs", category: "advanced"}
cleverMaxDelLength: {description: "Maximum deletion length to look for from clever predictions.", category: "advanced"}
maxLengthDiff: {description: "Maximum length difference between split-read and read-pair deletion to be considered identical ", category: "advanced"}
maxOffset: {description: "Maximum center distance between split-read and read-pair deletion to be considered identical", category: "advanced"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.", category: "advanced"}
}
}
task Mateclever {
task Prediction {
input {
File fiteredBam
File indexedFiteredBam
File bamFile
File bamIndex
BwaIndex bwaIndex
File predictions
String outputPath
Int cleverMaxDelLength = 100000
Int maxLengthDiff= 30
Int maxOffset = 150
Int threads = 10
String memory = "15G"
......@@ -68,21 +75,18 @@ task Mateclever {
command {
set -e
mkdir -p "$(dirname ~{outputPath})"
echo ~{outputPath} ~{fiteredBam} ~{predictions} none > predictions.list
mateclever \
clever \
-T ~{threads} \
-k \
--use_mapq \
--sorted \
-f \
-M ~{cleverMaxDelLength} \
-z ~{maxLengthDiff} \
-o ~{maxOffset} \
~{bamFile} \
~{bwaIndex.fastaFile} \
predictions.list \
~{outputPath}
}
output {
File matecleverVcf = outputPath + "/deletions.vcf"
File predictions = outputPath + "/predictions.vcf"
}
runtime {
......@@ -92,6 +96,7 @@ task Mateclever {
}
parameter_meta {
<<<<<<< HEAD
fiteredBam: {description: "The bam file where sequences less than 30bp were removed.", category: "advanced"}
indexedFiteredBam: {description: "The index of the filtered bam file.", category: "advanced"}
bwaIndex: {description: "The BWA index files.", category: "required"}
......@@ -102,6 +107,15 @@ task Mateclever {
maxLengthDiff: {description: "Maximum length difference between split-read and read-pair deletion to be considered identical ", category: "advanced"}
cleverMaxDelLength: {description: "Maximum deletion length to look for from clever predictions.", category: "advanced"}
memory: {description: "The memory required to run the programs", category: "advanced"}
=======
# inputs
bamFile: {description: "The bam file to process.", category: "required"}
bamIndex: {description: "The index bam file.", category: "required"}
bwaIndex: {description: "The BWA index files.", category: "required"}
outputPath: {description: "The location the output VCF file should be written.", category: "common"}
threads: {description: "The the number of threads required to run a program", category: "common"}
memory: {description: "The memory required to run the programs", category: "common"}
>>>>>>> 338f85339b62da7921f2d5d68d0870e81a80d542
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.", category: "advanced"}
}
}
......@@ -33,6 +33,7 @@ task CallSV {
}
parameter_meta {
# inputs
bamFile: {description: "The bam file to process.", category: "required"}
bamIndex: {description: "The index bam file.", category: "required"}
referenceFasta: {description: "The reference fasta file also used for mapping.", category: "required"}
......
......@@ -2,15 +2,13 @@ version 1.0
import "common.wdl"
task Somatic {
task Germline {
input {
File tumorBam
File tumorBamIndex
File? normalBam
File? normalBamIndex
File bamFile
File bamIndex
File referenceFasta
File referenceFastaFai
String runDir = "./manta_run"
String runDir
File? callRegions
File? callRegionsIndex
Boolean exome = false
......@@ -21,9 +19,9 @@ task Somatic {
}
command {
set -e
configManta.py \
~{"--normalBam " + normalBam} \
~{"--tumorBam " + tumorBam} \
~{"--normalBam " + bamFile} \
--referenceFasta ~{referenceFasta} \
~{"--callRegions " + callRegions} \
--runDir ~{runDir} \
......@@ -36,18 +34,8 @@ task Somatic {
}
output {
File candidateSmallIndelsVcf = runDir + "/results/variants/candidateSmallIndels.vcf.gz"
File candidateSmallIndelsVcfIndex = runDir + "/results/variants/candidateSmallIndels.vcf.gz.tbi"
File candidateSVVcf = runDir + "/results/variants/candidateSV.vcf.gz"
File candidatSVVcfIndex = runDir + "/results/variants/candidateSV.vcf.gz.tbi"
File tumorSVVcf = if defined(normalBam)
then runDir + "/results/variants/somaticSV.vcf.gz"
else runDir + "/results/variants/tumorSV.vcf.gz"
File tumorSVVcfIndex = if defined(normalBam)
then runDir + "/results/variants/somaticSV.vcf.gz.tbi"
else runDir + "/results/variants/tumorSV.vcf.gz.tbi"
File? diploidSV = runDir + "/results/variants/diploidSV.vcf.gz"
File? diploidSVindex = runDir + "/results/variants/diploidSV.vcf.gz.tbi"
File mantaVCF = runDir + "/results/variants/diploidSV.vcf.gz"
File mantaVCFindex = runDir + "/results/variants/diploidSV.vcf.gz.tbi"
}
runtime {
......@@ -58,29 +46,29 @@ task Somatic {
parameter_meta {
# inputs
tumorBam: {description: "The tumor/case sample's BAM file.", category: "required"}
tumorBamIndex: {description: "The index for the tumor/case sample's BAM file.", category: "required"}
normalBam: {description: "The normal/control sample's BAM file.", category: "common"}
normalBamIndex: {description: "The index for the normal/control sample's BAM file.", category: "common"}
referenceFasta: {description: "The reference fasta file which was also used for mapping.", category: "required"}
referenceFastaFai: {description: "The index for the reference fasta file.", category: "required"}
bamFile: {description: "The bam file to process.", category: "required"}
bamIndex: {description: "The index bam file.", category: "required"}
referenceFasta: {description: "The reference fasta file also used for mapping.", category: "advanced"}
referenceFastaFai: {description: "Fasta index (.fai) file of the reference", category: "required" }
runDir: {description: "The directory to use as run/output directory.", category: "common"}
callRegions: {description: "The bed file which indicates the regions to operate on.", category: "common"}
callRegionsIndex: {description: "The index of the bed file which indicates the regions to operate on.", category: "common"}
exome: {description: "Whether or not the data is from exome sequencing.", category: "common"}
cores: {description: "The number of cores to use.", category: "advanced"}
memoryGb: {description: "The amount of memory this job will use in Gigabytes.", category: "advanced"}
cores: {description: "The the number of cores required to run a program", category: "common"}
memoryGb: {description: "The memory required to run the manta", category: "common"}
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.", category: "advanced"}
}
}
task Germline {
task Somatic {
input {
File bamFile
File bamIndex
File tumorBam
File tumorBamIndex
File? normalBam
File? normalBamIndex
File referenceFasta
File referenceFastaFai
String runDir
String runDir = "./manta_run"
File? callRegions
File? callRegionsIndex
Boolean exome = false
......@@ -91,9 +79,9 @@ task Germline {
}
command {
set -e
configManta.py \
~{"--normalBam " + bamFile} \
~{"--normalBam " + normalBam} \
~{"--tumorBam " + tumorBam} \
--referenceFasta ~{referenceFasta} \
~{"--callRegions " + callRegions} \
--runDir ~{runDir} \
......@@ -106,8 +94,18 @@ task Germline {
}
output {
File mantaVCF = runDir + "/results/variants/diploidSV.vcf.gz"
File mantaVCFindex = runDir + "/results/variants/diploidSV.vcf.gz.tbi"
File candidateSmallIndelsVcf = runDir + "/results/variants/candidateSmallIndels.vcf.gz"
File candidateSmallIndelsVcfIndex = runDir + "/results/variants/candidateSmallIndels.vcf.gz.tbi"
File candidateSVVcf = runDir + "/results/variants/candidateSV.vcf.gz"
File candidatSVVcfIndex = runDir + "/results/variants/candidateSV.vcf.gz.tbi"
File tumorSVVcf = if defined(normalBam)
then runDir + "/results/variants/somaticSV.vcf.gz"
else runDir + "/results/variants/tumorSV.vcf.gz"
File tumorSVVcfIndex = if defined(normalBam)
then runDir + "/results/variants/somaticSV.vcf.gz.tbi"
else runDir + "/results/variants/tumorSV.vcf.gz.tbi"
File? diploidSV = runDir + "/results/variants/diploidSV.vcf.gz"
File? diploidSVindex = runDir + "/results/variants/diploidSV.vcf.gz.tbi"
}
runtime {
......@@ -130,4 +128,3 @@ task Germline {
dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.", category: "advanced"}
}
}
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