diff --git a/CHANGELOG.md b/CHANGELOG.md index ac978a0e6779efd1169be3419199e86f5ce8fe7e..48ea5fdfcc6eb95931a95f55e23ce165351d7e9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ that users understand how the changes affect the new version. version 1.1.0-dev --------------------------- ++ Added bwakit task + Minimap2: Add the option for --MD tag + TALON: Update average memory needs for main TALON process diff --git a/bwa.wdl b/bwa.wdl index c74bc12cc3f7edf982259286f701fb001b7ee9ef..b1079cf2a35e21069a133c383dc01b6f073b7e41 100644 --- a/bwa.wdl +++ b/bwa.wdl @@ -44,6 +44,99 @@ task Mem { } } +task Kit { + input { + File read1 + File? read2 + BwaIndex bwaIndex + String outputPrefix + String? readgroup + Boolean sixtyFour = false + + Int threads = 2 + Int sortThreads = 2 + Int memory = 10 + String dockerImage = "biocontainers/bwakit:v0.7.15_cv1" + } + + command { + set -e + bwa mem \ + -t ~{threads} \ + ~{"-R '" + readgroup}~{true="'" false="" defined(readgroup)} \ + ~{bwaIndex.fastaFile} \ + ~{read1} \ + ~{read2} \ + 2> ~{outputPrefix}.log.bwamem | \ + k8 /opt/conda/bin/bwa-postalt.js \ + -p ~{outputPrefix}.hla \ + ~{bwaIndex.fastaFile}~{true=".64.alt" false=".alt" sixtyFour} | \ + samtools sort \ + -@ ~{sortThreads} \ + -m1G \ + - \ + -o ~{outputPrefix}.aln.bam + samtools index ~{outputPrefix}.aln.bam ~{outputPrefix}.aln.bai + } + + output { + File outputBam = outputPrefix + ".aln.bam" + File outputBamIndex = outputPrefix + ".aln.bai" + } + + runtime { + cpu: threads + sortThreads + memory: memory + docker: dockerImage + } + + parameter_meta { + read1: { + description: "The first-end fastq file.", + category: "required" + } + read2: { + description: "The second-end fastq file.", + category: "common" + } + bwaIndex: { + description: "The BWA index, including a .alt file.", + category: "required" + } + outputPrefix: { + description: "The prefix of the output files, including any parent directories", + category: "required" + } + readgroup: { + description: "A readgroup identifier.", + category: "common" + } + sixtyFour: { + description: "Whether or not the index uses the '.64' suffixes.", + category: "common" + } + threads: { + description: "The number of threads to use for alignment.", + category: "advanced" + } + sortThreads: { + description: "The number of threads to use for sorting.", + category: "advanced" + } + memory: { + description: "The amount of memory this job will use.", + category: "advanced" + } + dockerImage: { + description: "The docker image used for this task. Changing this may result in errors which the developers may chose not to address.", + category: "advanced" + } + + outputBam: "The produced BAM file." + outputBamIndex: "The index of the produced BAM file." + } +} + struct BwaIndex { File fastaFile Array[File] indexFiles