From e6c8bfa8c270a79033910d8efb9c0c3279ee74f1 Mon Sep 17 00:00:00 2001 From: Peter van 't Hof <p.j.van_t_hof@lumc.nl> Date: Fri, 30 Oct 2015 08:58:07 +0100 Subject: [PATCH] fixed dependencies foe summary --- .../biopet/core/summary/SummaryQScript.scala | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScript.scala b/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScript.scala index 264800c70..cc45e751a 100644 --- a/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScript.scala +++ b/public/biopet-core/src/main/scala/nl/lumc/sasc/biopet/core/summary/SummaryQScript.scala @@ -96,22 +96,25 @@ trait SummaryQScript extends BiopetQScript { qscript => val writeSummary = new WriteSummary(this) def addChecksum(file: File): Unit = { - if (writeSummary.md5sum && !SummaryQScript.md5sumCache.contains(file)) { - val md5sum = new Md5sum(this) { - override def configName = "md5sum" - override def cmdLine: String = super.cmdLine + " || " + - required("echo") + required("error_on_capture " + input.toString) + " > " + required(output) - } - md5sum.input = file - md5sum.output = new File(file.getParentFile, file.getName + ".md5") - - // Need to not write a md5 file outside the outputDir - if (!file.getAbsolutePath.startsWith(outputDir.getAbsolutePath)) - md5sum.output = new File(outputDir, ".md5" + file.getAbsolutePath + ".md5") - - writeSummary.deps :+= md5sum.output - SummaryQScript.md5sumCache += file -> md5sum.output - add(md5sum) + if (writeSummary.md5sum) { + if (!SummaryQScript.md5sumCache.contains(file)) { + val md5sum = new Md5sum(this) { + override def configName = "md5sum" + + override def cmdLine: String = super.cmdLine + " || " + + required("echo") + required("error_on_capture " + input.toString) + " > " + required(output) + } + md5sum.input = file + md5sum.output = new File(file.getParentFile, file.getName + ".md5") + + // Need to not write a md5 file outside the outputDir + if (!file.getAbsolutePath.startsWith(outputDir.getAbsolutePath)) + md5sum.output = new File(outputDir, ".md5" + file.getAbsolutePath + ".md5") + + writeSummary.deps :+= md5sum.output + SummaryQScript.md5sumCache += file -> md5sum.output + add(md5sum) + } else writeSummary.deps :+= SummaryQScript.md5sumCache(file) } //TODO: add more checksums types } -- GitLab