Skip to content
Snippets Groups Projects
Commit 6941feb1 authored by Moustakas's avatar Moustakas
Browse files

Merge remote-tracking branch 'origin/develop' into controlTreat

parents 282dacb0 46a74f87
No related branches found
No related tags found
1 merge request!67fix CaseControl and macs2 tasks
version 1.0
import "../common.wdl" as common
task SampleConfig {
input {
File? toolJar
......@@ -77,3 +79,41 @@ task SampleConfigCromwellArrays {
memory: ceil(memory * memoryMultiplier)
}
}
task CaseControl {
input {
File? toolJar
String? preCommand
Array[File]+ inputFiles
Array[File]+ sampleConfigs
String outputPath
String controlTag = "control"
Int memory = 4
Float memoryMultiplier = 1.5
}
String toolCommand = if defined(toolJar)
then "java -Xmx" + memory + "G -jar " + toolJar
else "biopet-sampleconfig -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
mkdir -p $(dirname ~{outputPath})
~{toolCommand} CromwellArrays \
-i ~{sep="-i " inputFiles} \
-s ~{sep="-s " sampleConfigs} \
~{"-o " + outputPath} \
~{"--controlTag " + controlTag}
}
output {
File outputFile = outputPath
Array[CaseControl] caseControls = read_json(outputFile)
}
runtime {
memory: ceil(memory * memoryMultiplier)
}
}
......@@ -163,3 +163,10 @@ struct FastqPair {
File? R2
File? R2_md5
}
struct CaseControl {
String inputName
IndexedBamFile inputBam
String controlName
IndexedBamFile controlBam
}
......@@ -123,18 +123,12 @@ task CombineGVCFs {
command {
set -e -o pipefail
~{preCommand}
if [ ~{length(gvcfFiles)} -gt 1 ]; then
~{toolCommand} \
CombineGVCFs \
-R ~{reference.fasta} \
-O ~{outputPath} \
-V ~{sep=' -V ' gvcfFiles} \
-L ~{sep=' -L ' intervals}
else # TODO this should be handeled in wdl
ln -sf ~{gvcfFiles[0]} ~{outputPath}
ln -sf ~{gvcfFiles[0]} ~{outputPath}.tbi
fi
~{toolCommand} \
CombineGVCFs \
-R ~{reference.fasta} \
-O ~{outputPath} \
-V ~{sep=' -V ' gvcfFiles} \
-L ~{sep=' -L ' intervals}
}
output {
......
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