From 8c8cc282377b4787e87680874f43bf37f4cac7ff Mon Sep 17 00:00:00 2001
From: JasperBoom <jboom@infernum.nl>
Date: Fri, 20 Mar 2020 16:42:09 +0100
Subject: [PATCH] Update lima to correctly collect bam files.

---
 lima.wdl | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/lima.wdl b/lima.wdl
index 52f1697..125b12c 100644
--- a/lima.wdl
+++ b/lima.wdl
@@ -85,17 +85,18 @@ task Lima {
         ~{"--log-file " + outputPrefix + ".fl.stderr.log"} \
         ~{inputBamFile} \
         ~{barcodeFile} \
-        ~{outputPrefix + ".fl.bam"}
+        ~{basename(outputPrefix) + ".fl.bam"}
     }
 
     output {
-        File outputFLfile = outputPrefix + "*.bam"
-        File outputFLindexFile = outputPrefix + "*.bam.pbi"
+        Array[File] outputFLfile = glob("~{basename(outputPrefix)}*.bam")
+        Array[File] outputFLindexFile = glob("~{basename(outputPrefix)}*.bam.pbi")
+        Array[File] outputFLxmlFile = glob("~{basename(outputPrefix)}*.subreadset.xml")
         File outputSTDERRfile = outputPrefix + ".fl.stderr.log"
-        File outputJSONfile = outputPrefix + ".fl.json"
-        File outputCountsFile = outputPrefix + ".fl.lima.counts"
-        File outputReportFile = outputPrefix + ".fl.lima.report"
-        File outputSummaryFile = outputPrefix + ".fl.lima.summary"
+        File outputJSONfile = "~{basename(outputPrefix)}.fl.json"
+        File outputCountsFile = "~{basename(outputPrefix)}.fl.lima.counts"
+        File outputReportFile = "~{basename(outputPrefix)}.fl.lima.report"
+        File outputSummaryFile = "~{basename(outputPrefix)}.fl.lima.summary"
     }
 
     runtime {
-- 
GitLab