From f05d968d69d6c3a41b03a761a4a4838e5889df6c Mon Sep 17 00:00:00 2001 From: Ruben Vorderman <r.h.p.vorderman@lumc.nl> Date: Mon, 24 Oct 2022 14:45:15 +0200 Subject: [PATCH] Add a Bwa index task --- bwa.wdl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/bwa.wdl b/bwa.wdl index d4f4495..f79a219 100644 --- a/bwa.wdl +++ b/bwa.wdl @@ -114,3 +114,29 @@ struct BwaIndex { File fastaFile Array[File] indexFiles } + +task Index { + input { + File fasta + } + File indexedFile = "reference.fasta" + + command { + set -e + cp ~{fasta} ~{indexedFile} + bwa index ~{indexedFile} + } + + output { + BwaIndex index = { + "fastaFile": indexedFile, + "indexFiles": [ + indexedFile + ".amb", + indexedFile + ".ann", + indexedFile + ".bwt", + indexedFile + ".pac", + indexedFile + ".sa" + ] + } + } +} \ No newline at end of file -- GitLab