diff --git a/picard.wdl b/picard.wdl index 6a52ee4c53a62a5b3b48a5cd1ed41838c2dd4e28..4b70a0b4e17a909438dd2ee270d02071ea07e703 100644 --- a/picard.wdl +++ b/picard.wdl @@ -240,6 +240,40 @@ task GatherBamFiles { } } +task GatherVcfs { + input { + String? preCommand + Array[File]+ inputVcfs + Array[File]+ inputVcfIndexes + String outputVcfPath + String? picardJar + + Int memory = 4 + Float memoryMultiplier = 3.0 + } + + String toolCommand = if defined(picardJar) + then "java -Xmx" + memory + "G -jar " + picardJar + else "picard -Xmx" + memory + "G" + + command { + set -e -o pipefail + ~{preCommand} + ~{toolCommand} \ + GatherVcfs \ + INPUT=~{sep=' INPUT=' inputVcfs} \ + OUTPUT=~{outputVcfPath} + } + + output { + File outputVcf = outputVcfPath + } + + runtime { + memory: ceil(memory * memoryMultiplier) + } +} + # Mark duplicate reads to avoid counting non-independent observations task MarkDuplicates { input {