From 87c555a6e15cb4eb2d034e664da9413115703db6 Mon Sep 17 00:00:00 2001
From: Ruben Vorderman <r.h.p.vorderman@lumc.nl>
Date: Mon, 29 Jan 2018 10:49:01 +0100
Subject: [PATCH] debugged output file

---
 fastqc.wdl | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/fastqc.wdl b/fastqc.wdl
index bd660f7..8be2258 100644
--- a/fastqc.wdl
+++ b/fastqc.wdl
@@ -36,12 +36,16 @@ task fastqc {
     ${"--kmers " + kmers} \
     ${"--dir " + dir} \
     ${seqFile}
+
     }
 
     output {
-        String reportDir = outdirPath + "/" + sub(basename(seqFile), "..*$", "_fastqc")
+        # Apparently, the escape character needs to be escaped in regexes.
+        # This regex chops of the extension and replaces it with _fastqc for the reportdir.
+        # Just as fastqc does it.
+        String reportDir = outdirPath + "/" + sub(basename(seqFile), "\\.[^\\.]*$", "_fastqc")
         File rawReport = reportDir + "/fastqc_data.txt"
-        File htmlReport = reportDir + "fastqc_report.html"
+        File htmlReport = reportDir + "/fastqc_report.html"
         File summary = reportDir + "/summary.txt"
         File adapterContent = reportDir + "/Images/adapter_content.png"
         File duplicationLevels = reportDir + "/Images/duplication_levels.png"
-- 
GitLab