Commit 7eba2ad3 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Merge remote-tracking branch 'remotes/origin/develop' into fix-BIOPET-546

parents e28ecd68 cefa43a5
...@@ -93,14 +93,19 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript => ...@@ -93,14 +93,19 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
} }
logger.info("Running pre commands") logger.info("Running pre commands")
for (function <- functions) function match { var count = 0
case f: BiopetCommandLineFunction => for (function <- functions) {
f.preProcessExecutable() function match {
f.beforeGraph() case f: BiopetCommandLineFunction =>
f.internalBeforeGraph() f.preProcessExecutable()
f.commandLine f.beforeGraph()
case f: WriteSummary => f.init() f.internalBeforeGraph()
case _ => f.commandLine
case f: WriteSummary => f.init()
case _ =>
}
count += 1
if (count % 500 == 0) logger.info(s"Preprocessing done for ${count} jobs out of ${functions.length} total")
} }
val logDir = new File(outputDir, ".log" + File.separator + qSettings.runName.toLowerCase) val logDir = new File(outputDir, ".log" + File.separator + qSettings.runName.toLowerCase)
......
...@@ -116,11 +116,11 @@ object WriteDependencies extends Logging with Configurable { ...@@ -116,11 +116,11 @@ object WriteDependencies extends Logging with Configurable {
case s: WriteSummary if s.qscript.root == null => true case s: WriteSummary if s.qscript.root == null => true
case _ => false case _ => false
}), "intermediate" -> f.isIntermediate, }), "intermediate" -> f.isIntermediate,
"depends_on_intermediate" -> BiopetQScript.safeOutputs(f).getOrElse(Seq()).exists(files(_).isIntermediate), "depends_on_intermediate" -> BiopetQScript.safeInputs(f).getOrElse(Seq()).exists(files(_).isIntermediate),
"depends_on_jobs" -> BiopetQScript.safeOutputs(f).getOrElse(Seq()).toList.flatMap(files(_).outputJobNames).distinct, "depends_on_jobs" -> BiopetQScript.safeInputs(f).getOrElse(Seq()).toList.flatMap(files(_).outputJobNames).distinct,
"output_used_by_jobs" -> BiopetQScript.safeOutputs(f).getOrElse(Seq()).toList.flatMap(files(_).inputJobNames).distinct, "output_used_by_jobs" -> BiopetQScript.safeOutputs(f).getOrElse(Seq()).toList.flatMap(files(_).inputJobNames).distinct,
"outputs" -> (f.jobOutputFile :: BiopetQScript.safeOutputs(f).getOrElse(Seq()).toList), "outputs" -> (f.jobOutputFile :: BiopetQScript.safeOutputs(f).getOrElse(Seq()).toList),
"inputs" -> BiopetQScript.safeOutputs(f).getOrElse(Seq()).toList, "inputs" -> BiopetQScript.safeInputs(f).getOrElse(Seq()).toList,
"done_files" -> BiopetQScript.safeDoneFiles(f).getOrElse(Seq()).toList, "done_files" -> BiopetQScript.safeDoneFiles(f).getOrElse(Seq()).toList,
"fail_files" -> BiopetQScript.safeFailFiles(f).getOrElse(Seq()).toList, "fail_files" -> BiopetQScript.safeFailFiles(f).getOrElse(Seq()).toList,
"stdout_file" -> f.jobOutputFile, "stdout_file" -> f.jobOutputFile,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment