Commit 04e1e09f authored by Peter van 't Hof's avatar Peter van 't Hof

Fixed template

parent ba4edb5f
#import(nl.lumc.sasc.biopet.utils.summary.Summary)
#import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb)
#import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb._)
#import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb.Implicts._)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
#import(nl.lumc.sasc.biopet.pipelines.shiva.ShivaReport)
#import(scala.concurrent.Await)
#import(scala.concurrent.duration.Duration)
#import(nl.lumc.sasc.biopet.pipelines.bammetrics.BammetricsReport)
#import(java.io.File)
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] = None %>
<%@ var summary: SummaryDb %>
<%@ var sampleId: Option[Int] = None %>
<%@ var rootPath: String %>
<%@ var outputDir: File %>
<%@ var showPlot: Boolean = false %>
......@@ -11,13 +15,11 @@
<%@ var showIntro: Boolean = true %>
<%@ var target: Option[String] = None %>
<%@ var caller: String = "final" %>
<%@ var runId: Int %>
#{
val fields = List("Hom", "HomVar", "Het", "HomRef", "NoCall", "Variant", "Total")
val samples = sampleId match {
case Some(sample) => List(sample.toString)
case _ => summary.samples.toList
}
val samples = Await.result(summary.getSamples(runId = Some(runId), sampleId = sampleId), Duration.Inf)
val vcfstatsKey = target match {
case Some(t) => s"multisample-vcfstats-$caller-$t"
case _ => s"multisample-vcfstats-$caller"
......@@ -75,10 +77,16 @@
</tr></thead>
<tbody>
#for (sample <- samples.toList.sorted)
<tr><td><a href="${rootPath}Samples/${sample}/index.html">${sample}</a></td>
#for (field <- fields)
<td>${summary.getValue("shivavariantcalling", "stats", vcfstatsKey, "total", "genotype", "general", sample, field)}</td>
#end
<tr><td><a href="${rootPath}Samples/${sample.name}/index.html">${sample.name}</a></td>
#{
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)
}#
#for (field <- fields)
<td>${results(field)}</td>
#end
</tr>
#end
</tbody>
......
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