Commit 40109cd0 authored by Peter van 't Hof's avatar Peter van 't Hof

WIP

parent e2dcb312
#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.Schema.Library)
#import(nl.lumc.sasc.biopet.utils.summary.db.Schema.Sample)
#import(nl.lumc.sasc.biopet.utils.summary.db.SummaryDb.Implicts._)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
#import(nl.lumc.sasc.biopet.core.report.ReportBuilder)
#import(nl.lumc.sasc.biopet.pipelines.gears.GearsKraken)
#import(java.io.File)
#import(java.io.PrintWriter)
<%@ var summary: Summary %>
<%@ var summary: SummaryDb %>
<%@ var rootPath: String %>
<%@ var sampleId: Option[String] = None %>
<%@ var libId: Option[String] = None %>
<%@ var sampleId: Option[Int] = None %>
<%@ var libId: Option[Int] = None %>
<%@ var args: Map[String, Any] %>
<%@ var outputDir: File %>
<%@ var centrifugeTag: Option[String] = None %>
<%@ var summaryStatsTag: String = "krakenreport" %>
<%@ var summaryModuleTag: String = "gearskraken" %>
<%@ var runId: Int %>
<%@ var allSamples: Seq[Sample] %>
<%@ var allLibraries: Seq[Library] %>
#{
val samples = sampleId match {
case Some(id) => allSamples.filter(_.id == id).toList
case _ => allSamples.toList
}
}#
<%
val summaries = if (sampleId.isEmpty) {
summary.getSampleValues(summaryModuleTag, "stats", summaryStatsTag).map(x => x._1 -> x._2.get.asInstanceOf[Map[String, Any]])
} else summary.getValue(sampleId, libId, summaryModuleTag, "stats", summaryStatsTag).map(sampleId.get -> _.asInstanceOf[Map[String, Any]]).toList.toMap
val summaries = summary.getStatsForSamples(runId, summaryModuleTag, summaryStatsTag, sampleId.map(SummaryDb.SampleId),
Map("all" -> Nil)
)
val totalReads = if (sampleId.isEmpty) {
centrifugeTag.map {tag => summary.getSampleValues(summaryModuleTag, "stats", tag, "metrics", "Read").map(x => x._1 -> x._2.getOrElse(0L).toString.toLong) }
......
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