From 996a5fefa828ca89191696d8284bff73c6e3f6cc Mon Sep 17 00:00:00 2001 From: Ruben Vorderman <r.h.p.vorderman@lumc.nl> Date: Mon, 24 Feb 2020 14:46:13 +0100 Subject: [PATCH] add selectvariants tasks --- gatk.wdl | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/gatk.wdl b/gatk.wdl index 1aa23ea..754bbc6 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 -- GitLab