Commit 003136c0 authored by Peter van 't Hof's avatar Peter van 't Hof

Fix compile issues

parent 06e9f248
......@@ -17,7 +17,7 @@ package nl.lumc.sasc.biopet.core.report
import java.io._
import nl.lumc.sasc.biopet.core.ToolCommandFunction
import nl.lumc.sasc.biopet.utils.summary.db.Schema.{ Library, Module, Pipeline, Sample }
import nl.lumc.sasc.biopet.utils.summary.db.Schema.{ Library, Module, Pipeline, Sample, Run }
import nl.lumc.sasc.biopet.utils.summary.db.SummaryDb
import nl.lumc.sasc.biopet.utils.{ IoUtils, Logging, ToolCommand }
import org.broadinstitute.gatk.utils.commandline.Input
......@@ -39,7 +39,7 @@ trait ReportBuilderExtension extends ToolCommandFunction {
/** Report builder object */
def builder: ReportBuilder
def toolObject = builder
def toolObject: ReportBuilder = builder
@Input(required = true)
var summaryDbFile: File = _
......@@ -112,20 +112,24 @@ trait ReportBuilder extends ToolCommand {
private var setSummary: SummaryDb = _
/** Retrival of summary, read only */
final def summary = setSummary
final def summary: SummaryDb = setSummary
private var setRunId: Int = 0
final def runId = setRunId
final def runId: Int = setRunId
private var _setRun: Run = _
final def run: Run = _setRun
private var _setPipelines = Seq[Pipeline]()
final def pipelines = _setPipelines
final def pipelines: Seq[Pipeline] = _setPipelines
private var _setModules = Seq[Module]()
final def modules = _setModules
final def modules: Seq[Module] = _setModules
private var _setSamples = Seq[Sample]()
final def samples = _setSamples
final def samples: Seq[Sample] = _setSamples
private var _setLibraries = Seq[Library]()
final def libraries = _setLibraries
final def libraries: Seq[Library] = _setLibraries
/** default args that are passed to all page withing the report */
def pageArgs: Map[String, Any] = Map()
......@@ -134,13 +138,13 @@ trait ReportBuilder extends ToolCommand {
private var total = 0
private var _sampleId: Option[Int] = None
protected[report] def sampleId = _sampleId
protected[report] def sampleId: Option[Int] = _sampleId
private var _libId: Option[Int] = None
protected[report] def libId = _libId
protected[report] def libId: Option[Int] = _libId
case class ExtFile(resourcePath: String, targetPath: String)
def extFiles = List(
def extFiles: List[ExtFile] = List(
"css/bootstrap_dashboard.css",
"css/bootstrap.min.css",
"css/bootstrap-theme.min.css",
......@@ -181,6 +185,7 @@ trait ReportBuilder extends ToolCommand {
case _ =>
}
_setRun = Await.result(summary.getRuns(runId = Some(runId)), Duration.Inf).head
_setPipelines = Await.result(summary.getPipelines(runId = Some(runId)), Duration.Inf)
_setModules = Await.result(summary.getModules(runId = Some(runId)), Duration.Inf)
_setSamples = Await.result(summary.getSamples(runId = Some(runId), sampleId = sampleId), Duration.Inf)
......@@ -240,6 +245,7 @@ trait ReportBuilder extends ToolCommand {
val rootPath = "./" + Array.fill(path.size)("../").mkString
val pageArgs = args ++ page.args ++
Map("page" -> page,
"run" -> run,
"path" -> path,
"outputDir" -> pageOutputDir,
"rootPath" -> rootPath,
......
#import(nl.lumc.sasc.biopet.utils.summary.db.Schema.Run)
#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._)
......@@ -7,9 +8,9 @@
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
#import(org.apache.commons.io.FileUtils)
#import(java.io.File)
#import(nl.lumc.sasc.biopet.core.report.ReportBuilder.ec)
<%@ var summary: SummaryDb %>
<%@ var runId: Int %>
<%@ var run: Run %>
<%@ var sampleId: Option[Int] %>
<%@ var libId: Option[Int] %>
<%@ var plot: String %>
......@@ -17,7 +18,6 @@
#{
val settings = summary.getSettingKeys(runId, "flexiprep", NoModule, SampleId(sampleId.get), LibraryId(libId.get), keyValues = Map(
"skip_trim" -> List("skip_trim"), "skip_clip" -> List("skip_clip"), "paired" -> List("paired")))
val run = Await.result(summary.getRuns(runId = Some(runId)).map(_.head), Duration.Inf)
val paired: Boolean = settings("paired") == Some(true)
val skipClip: Boolean = settings("skip_clip") == Some(true)
......
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