Commit f1cf26d5 authored by Peter van 't Hof's avatar Peter van 't Hof

Format fix

parent 132ce5e5
......@@ -9,6 +9,7 @@
#import(java.io.File)
<%@ var summary: SummaryDb %>
<%@ var sampleId: Option[Int] = None %>
<%@ var multisample: Boolean = true %>
<%@ var rootPath: String %>
<%@ var outputDir: File %>
<%@ var showPlot: Boolean = false %>
......@@ -82,7 +83,8 @@
#{
fields.map(x => x -> List("total", "genotype", "general", sample.name, x)).toMap
val statsPaths = fields.map(x => x -> List("total", "genotype", "general", sample.name, x)).toMap
val results = summary.getStatKeys(runId, "shivavariantcalling", "vcfstatsKey", sample = sample.id, keyValues = statsPaths)
val sampleQuery: SampleQuery = if (multisample) NoSample else SampleId(sampleId.get)
val results = summary.getStatKeys(runId, "shivavariantcalling", vcfstatsKey, sampleQuery, keyValues = statsPaths)
}#
#for (field <- fields)
......
......@@ -148,7 +148,7 @@ trait ShivaReportTrait extends MultisampleMappingReportTrait {
val samples = Await.result(summary.getSamples(runId = runId, sampleId = sampleId), Duration.Inf)
val statsPaths = {
(for (sample <- Await.result(summary.getSamples(runId = runId), Duration.Inf)) yield {
field.map(f => s"${sample.name};HomVar" -> List("total", "genotype", "general", sample.name, f)).toMap
field.map(f => s"${sample.name};$f" -> List("total", "genotype", "general", sample.name, f)).toMap
}).fold(Map())(_ ++ _)
}
......@@ -160,7 +160,7 @@ trait ShivaReportTrait extends MultisampleMappingReportTrait {
val results = summary.getStatKeys(runId, "shivavariantcalling", moduleName, sampleId.map(SampleId).getOrElse(NoSample), keyValues = statsPaths)
for (sample <- samples if sampleId.isEmpty || sample.id == sampleId.get) {
tsvWriter.println(sample.name + "\t" + field.map(f => results(s"${sample.name};$f").getOrElse("")).mkString("\t"))
tsvWriter.println(sample.name + "\t" + field.map(f => results.get(s"${sample.name};$f").getOrElse(Some("0")).get).mkString("\t"))
}
tsvWriter.close()
......
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