diff --git a/gatk.wdl b/gatk.wdl index 1aa23ea8109900e0e6b46a089f50659211378635..754bbc6d1c362169742f25f90ab280da60f8439e 100644 --- a/gatk.wdl +++ b/gatk.wdl @@ -1347,6 +1347,62 @@ task PreprocessIntervals { } } +task SelectVariants { + input { + File referenceFasta + File referenceFastaDict + File referenceFastaFai + File inputVcf + File inputVcfIndex + String outputPath = "output.vcf.gz" + String? selectTypeToInclude + Array[File] intervals = [] + String memory = "16G" + String javaXmx = "4G" + String dockerImage = "quay.io/biocontainers/gatk4:4.1.0.0--0" + } + + command { + set -e + mkdir -p "$(dirname ~{outputPath})" + gatk --java-options -Xmx~{javaXmx} \ + SelectVariants \ + -R ~{referenceFasta} \ + -V ~{inputVcf} \ + ~{"--select-type-to-include " + selectTypeToInclude} \ + ~{true="-L" false="" length(intervals) > 0} ~{sep=' -L ' intervals} + } + + output { + File outputVcf = outputPath + File outputVcfIndex = outputPath + ".tbi" + } + + runtime { + docker: dockerImage + memory: memory + } + + parameter_meta { + inputVcf: {description: "The VCF input file.", category: "required"} + inputVcfIndex: {description: "The input VCF file's index.", category: "required"} + referenceFasta: {description: "The reference fasta file which was also used for mapping.", + category: "required"} + referenceFastaDict: {description: "The sequence dictionary associated with the reference fasta file.", + category: "required"} + referenceFastaFai: {description: "The index for the reference fasta file.", category: "required"} + selectTypeToInclude: {description: "Select only a certain type of variants from the input file", category: "common"} + outputPath: {description: "The location the output VCF file should be written.", category: "required"} + intervals: {description: "Bed files or interval lists describing the regions to operate on.", category: "advanced"} + + memory: {description: "The amount of memory this job will use.", category: "advanced"} + javaXmx: {description: "The maximum memory available to the program. Should be lower than `memory` to accommodate JVM overhead.", + 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 SplitNCigarReads { input { File inputBam