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

Added start for Flexiprep report

parent f8f34f35
#import(nl.lumc.sasc.biopet.core.summary.Summary)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] = None %>
<%@ var libId: Option[String] = None %>
#{
val samples = sampleId match {
case Some(sample) => List(sample.toString)
case _ => summary.samples.toList
}
}#
<table>
<thead><tr>
<th>Sample</th>
<th>Library</th>
<th>Read</th>
<th>Reads before QC</th>
<th>Bases before QC</th>
<th>Reads after QC</th>
<th>Bases after QC</th>
</tr></thead>
<tbody>
#for (sample <- samples.toList.sorted)
#{
val libs = libId match {
case Some(libId) => List(libId.toString)
case _ => summary.libraries(sample).toList
}
val sampleRowspan = {
libs.size +
libs.count(summary.getLibraryValue(sample, _, "flexiprep", "settings", "paired").getOrElse(false) == true)
}
}#
<tr><td rowspan="${sampleRowspan}">${sample}</td>
#for (libId <- summary.libraries(sample))
#{ val paired = summary.getLibraryValue(sample, libId, "flexiprep", "settings", "paired").getOrElse(false) }#
<td #if (paired == true) rowspan="2" #end>${libId}</td>
<td>R1</td>
<td>${summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_R1", "reads", "num_total")} </td>
<td> ${summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_R1", "bases", "num_total")}
</td>
<td>${summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_R1_after", "reads", "num_total")}</td>
<td> ${summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_R1_after", "bases", "num_total")}</td>
#if (paired == true)
</tr><tr>
<td>R2</td>
<td>${summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_R2", "reads", "num_total")}</td>
<td> ${summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_R2", "bases", "num_total")}</td>
<td>${summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_R2_after", "reads", "num_total")} </td>
<td> ${summary.getLibraryValue(sample, libId, "flexiprep", "stats", "seqstat_R2_after", "bases", "num_total")}</td>
#end
#end
</tr>
#end
</tbody>
</table>
\ No newline at end of file
package nl.lumc.sasc.biopet.pipelines.flexiprep
import nl.lumc.sasc.biopet.core.report.{ ReportPage, ReportBuilder }
/**
* Created by pjvan_thof on 3/30/15.
*/
object FlexiprepReport extends ReportBuilder {
val reportName = "Flexiprep"
def indexPage = {
ReportPage(Map(), Map("Summary" -> "/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepSummary.ssp"), Map())
}
// FIXME: Not yet finished
}
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