Skip to content
Snippets Groups Projects
Commit ea9fe977 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Changed executables for summary

parent a61296b2
No related branches found
No related tags found
No related merge requests found
......@@ -61,17 +61,6 @@ trait SummaryQScript extends BiopetQScript {
for ((_, summarizableList) <- summarizables; summarizable <- summarizableList; (_, file) <- summarizable.summaryFiles)
addChecksum(file)
for ((_, sl) <- summarizables) {
for (s <- sl) {
s match {
case c: BiopetCommandLineFunctionTrait => {
executables += c.configName -> (new File(c.executable), c.getVersion)
}
case _ =>
}
}
}
for ((_, file) <- this.summaryFiles)
addChecksum(file)
......
......@@ -48,10 +48,17 @@ class WriteSummary(val root: Configurable) extends InProcessFunction with Config
val pipelineMap = {
val files = parseFiles(qscript.summaryFiles)
val settings = qscript.summarySettings
val executables = {
for ((name, (file, version)) <- qscript.executables) yield {
name -> Map("version" -> version, "md5" -> BiopetCommandLineFunctionTrait.executableMd5Cache.getOrElse(file.getCanonicalPath, "N/A"))
}
val executables: Map[String, Any] = {
(for (f <- qscript.functions if f.isInstanceOf[BiopetCommandLineFunctionTrait]) yield {
f match {
case f: BiopetCommandLineFunctionTrait => {
f.configName -> Map("version" -> f.getVersion,
"md5" -> BiopetCommandLineFunctionTrait.executableMd5Cache.getOrElse(f.executable, None))
}
case _ => throw new IllegalStateException("This should not be possible")
}
}).toMap
}
val map = Map(qscript.summaryName -> ((if (settings.isEmpty) Map[String, Any]() else Map("settings" -> settings)) ++
......
......@@ -19,6 +19,7 @@ import java.io.File
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.core.summary.Summarizable
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
class BwaMem(val root: Configurable) extends Bwa {
......
......@@ -94,7 +94,8 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S
def summaryFile = new File(outputDir, sampleId.getOrElse("x") + "-" + libId.getOrElse("x") + ".summary.json")
def summaryFiles = Map()
def summaryFiles: Map[String, File] = Map("output_bamfile" -> finalBamFile, "input_R1" -> input_R1) ++
(if (input_R2.isDefined) Map("input_R2" -> input_R2.get) else Map())
def summarySettings = Map(
"skip_metrics" -> skipMetrics,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment