...
 
Commits (3)
......@@ -36,6 +36,7 @@ trait BiopetJavaCommandLineFunction
optional("-Dscala.concurrent.context.maxThreads=", threads, spaceSeparated = false)
override def beforeGraph(): Unit = {
super.beforeGraph()
setResources()
if (javaMemoryLimit.isEmpty && memoryLimit.isDefined)
javaMemoryLimit = memoryLimit
......
......@@ -97,6 +97,24 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
}
}
if (writeHtmlReport) {
logger.info("Adding report")
this match {
case q: MultiSampleQScript
if q.onlySamples.nonEmpty && !q.samples.forall(x => q.onlySamples.contains(x._1)) =>
logger.info("Write report is skipped because sample flag is used")
case _ =>
reportClass.foreach { report =>
for (f <- functions) f match {
case w: WriteSummary => report.deps :+= w.jobOutputFile
case _ =>
}
report.jobOutputFile = new File(report.outputDir, ".report.out")
add(report)
}
}
}
logger.info("Running pre commands")
var count = 0
val totalCount = functions.size
......@@ -146,24 +164,6 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
}
})
if (writeHtmlReport) {
logger.info("Adding report")
this match {
case q: MultiSampleQScript
if q.onlySamples.nonEmpty && !q.samples.forall(x => q.onlySamples.contains(x._1)) =>
logger.info("Write report is skipped because sample flag is used")
case _ =>
reportClass.foreach { report =>
for (f <- functions) f match {
case w: WriteSummary => report.deps :+= w.jobOutputFile
case _ =>
}
report.jobOutputFile = new File(report.outputDir, ".report.out")
add(report)
}
}
}
if (!skipWriteDependencies)
WriteDependencies.writeDependencies(functions, new File(logDir, "graph"))
else logger.debug("Write dependencies is skipped")
......
......@@ -123,10 +123,11 @@ class SummaryQScriptTest extends TestNGSuite with Matchers {
object SummaryQScriptTest {
def makeQscript(settings: Map[String, Any] = Map(),
files: Map[String, File] = Map(),
c: Map[String, Any] = Map()) =
c: Map[String, Any] = Map(),
md5: Boolean = true) =
new SummaryQScript with QScript {
outputDir = new File(".")
override def globalConfig = new Config(c)
override def globalConfig = new Config(c + ("summary_md5" -> md5))
def summarySettings: Map[String, Any] = settings
def summaryFiles: Map[String, File] = files
val tempFile: File = File.createTempFile("summary", ".json")
......
......@@ -358,13 +358,14 @@ object WriteSummaryTest {
def makeMultisampleQscript(name: String,
c: Map[String, Any],
md5: Boolean = true,
settings: Map[String, Any] = Map(),
files: Map[String, File] = Map(),
dir: File) =
new MultiSampleQScript with QScript {
summaryName = "test"
outputDir = dir
override def globalConfig = new Config(c + ("exe" -> "test"))
override def globalConfig = new Config(c + ("exe" -> "test") + ("summary_md5" -> md5))
def summarySettings: Map[String, Any] = settings
def summaryFiles: Map[String, File] = files
val tempFile: File = File.createTempFile("summary", ".json")
......