~{if defined(read2) then "--read2-out " + read2Output else ""}
}
output {
File extractedRead1 = read1Output
File? extractedRead2 = read2Output
}
runtime {
docker: dockerImage
}
parameter_meta {
read1: {description: "The first/single-end fastq file.", category: "required"}
read2: {description: "The second-end fastq file.", category: "common"}
bcPattern: {description: "The pattern to be used for UMI extraction. See the umi_tools docs for more information.", category: "required"}
bcPattern2: {description: "The pattern to be used for UMI extraction in the second-end reads. See the umi_tools docs for more information.", category: "advanced"}
threePrime: {description: "Whether or not the UMI's are at the reads' 3' end. If false the UMIs are extracted from the 5' end.", category: "advanced"}
read1Output: {description: "The location to write the first/single-end output fastq file to.", category: "advanced"}
read2Output: {description: "The location to write the second-end output fastq file to.", 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 Dedup {
input {
File inputBam
File inputBamIndex
String outputBamPath
String statsPrefix = "stats"
Boolean paired = true
String memory = "20G"
# Use a multi-package-container which includes umi_tools (0.5.5) and samtools (1.9)