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

Fixing fastqc plots

parent ef36c469
......@@ -7,6 +7,7 @@
#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 sampleId: Option[Int] %>
......@@ -16,6 +17,7 @@
#{
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)
......@@ -25,7 +27,7 @@
val file = Await.result(summary.getFile(runId, "flexiprep", read, SampleId(sampleId.get), LibraryId(libId.get), plot), Duration.Inf)
file.collect {
case path => {
val file = new File(path.path.toString)
val file = new File(run.outputDir + File.separator + path.path.toString)
val newFile = new File(outputDir, read + "_" + file.getName)
if (file.exists()) FileUtils.copyFile(file, newFile)
newFile.getName
......@@ -35,7 +37,7 @@
def plotAvailable(read:String) = {
val file = Await.result(summary.getFile(runId, "flexiprep", read, SampleId(sampleId.get), LibraryId(libId.get), plot), Duration.Inf)
file.map(x => new File(x.path).exists()).getOrElse(false)
file.map(x => new File(run.outputDir + File.separator + x.path).exists()).getOrElse(false)
}
}#
......
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