Commit 42115b3a authored by Peter van 't Hof's avatar Peter van 't Hof

Fixing summary values

parent 1d2d9186
......@@ -62,7 +62,6 @@ trait MultiSampleQScript extends SummaryQScript { qscript: QScript =>
currentSample = Some(sampleId)
currentLib = Some(libId)
addJobs()
qscript.addSummarizable(this, "pipeline", Some(sampleId), Some(libId))
currentLib = None
currentSample = None
}
......@@ -170,7 +169,6 @@ trait MultiSampleQScript extends SummaryQScript { qscript: QScript =>
Logging.addError(s"Sample '$sampleId' $nameError")
currentSample = Some(sampleId)
addJobs()
qscript.addSummarizable(this, "pipeline", Some(sampleId))
currentSample = None
}
......
......@@ -64,7 +64,8 @@ trait SummaryQScript extends BiopetQScript { qscript: QScript =>
* @param libraryId Id of libary
* @param forceSingle If true it replaces summarizable instead of adding to it
*/
def addSummarizable(summarizable: Summarizable, name: String,
def addSummarizable(summarizable: Summarizable,
name: String,
sampleId: Option[String] = None,
libraryId: Option[String] = None,
forceSingle: Boolean = false): Unit = {
......
......@@ -149,14 +149,14 @@ class WriteSummary(val parent: SummaryQScript) extends InProcessFunction with Co
// Sample level
val sampleId = Await.result(db.getSampleId(qscript.summaryRunId, sampleName), Duration.Inf).getOrElse(throw new IllegalStateException("Sample should already exist in database"))
for ((key, file) <- sample.summaryFiles.par)
Await.result(createFile(db, q.summaryRunId, pipelineId, Some(sampleId), None, None, key, file, outputDir), Duration.Inf)
Await.result(createFile(db, q.summaryRunId, pipelineId, None, Some(sampleId), None, key, file, outputDir), Duration.Inf)
db.createOrUpdateSetting(qscript.summaryRunId, pipelineId, None, Some(sampleId), None, ConfigUtils.mapToJson(sample.summarySettings).nospaces)
for ((libName, lib) <- sample.libraries) {
// Library level
val libId = Await.result(db.getLibraryId(qscript.summaryRunId, sampleId, libName), Duration.Inf).getOrElse(throw new IllegalStateException("Library should already exist in database"))
for ((key, file) <- lib.summaryFiles.par)
Await.result(createFile(db, q.summaryRunId, pipelineId, Some(sampleId), Some(libId), None, key, file, outputDir), Duration.Inf)
Await.result(createFile(db, q.summaryRunId, pipelineId, None, Some(sampleId), Some(libId), key, file, outputDir), Duration.Inf)
db.createOrUpdateSetting(qscript.summaryRunId, pipelineId, None, Some(sampleId), Some(libId), ConfigUtils.mapToJson(lib.summarySettings).nospaces)
}
}
......
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