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

Added a merge step

parent 5c207b0b
......@@ -20,7 +20,7 @@ import java.io.{ File, PrintWriter }
import nl.lumc.sasc.biopet.utils.config.Configurable
import nl.lumc.sasc.biopet.core._
import nl.lumc.sasc.biopet.utils.ConfigUtils
import nl.lumc.sasc.biopet.{ LastCommitHash, Version }
import nl.lumc.sasc.biopet.LastCommitHash
import org.broadinstitute.gatk.queue.function.{ InProcessFunction, QFunction }
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
......@@ -90,7 +90,7 @@ class WriteSummary(val root: Configurable) extends InProcessFunction with Config
}
(
qscript.functions.flatMap(fetchVersion(_)) ++
qscript.functions.flatMap(fetchVersion) ++
qscript.functions
.flatMap {
case f: BiopetCommandLineFunction => f.pipesJobs
......@@ -99,28 +99,28 @@ class WriteSummary(val root: Configurable) extends InProcessFunction with Config
).toMap
}
val map = Map(qscript.summaryName -> (Map(
val map = Map(qscript.summaryName -> Map(
"settings" -> settings,
"files" -> Map("pipeline" -> files),
"executables" -> executables.toMap))
"executables" -> executables.toMap)
)
qscript match {
case tag: SampleLibraryTag => prefixSampleLibrary(map, tag.sampleId, tag.libId)
case q: MultiSampleQScript => {
Map("samples" -> q.samples.map {
case (sampleName, sample) =>
sampleName -> Map(
qscript.summaryName -> Map("settings" -> sample.summarySettings),
"libraries" -> sample.libraries.map {
case (libName, lib) =>
sampleName -> Map(
qscript.summaryName -> Map("settings" -> lib)
)
}
)
}) ++ map
}
case q: MultiSampleQScript =>
ConfigUtils.mergeMaps(
Map("samples" -> q.samples.map {
case (sampleName, sample) =>
sampleName -> Map(
qscript.summaryName -> Map("settings" -> sample.summarySettings),
"libraries" -> sample.libraries.map {
case (libName, lib) =>
sampleName -> Map(
qscript.summaryName -> Map("settings" -> lib.summarySettings)
)
}
)
}), map)
case _ => map
}
}
......
Supports Markdown
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