Commit 7db17d65 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Adding report to mapping pipeline

parent 870a82d6
#import(nl.lumc.sasc.biopet.core.summary.Summary)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
<%@ var summary: Summary %>
<%@ var rootPath: String %>
<%@ var sampleId: Option[String] %>
<%@ var libId: Option[String] %>
<table class="table">
<tbody>
<tr><th>Pipeline</th><td>Mapping</td></tr>
<tr><th>Version</th><td>${summary.getValue("meta", "pipeline_version")}</td></tr>
<tr><th>Last commit hash</th><td>${summary.getValue("meta", "last_commit_hash")}</td></tr>
<tr><th>Output directory</th><td>${summary.getValue("meta", "output_dir")}</td></tr>
<tr><th>Sample ID</th><td>${sampleId}</td></tr>
<tr><th>Library ID</th><td>${libId}</td></tr>
</tbody>
</table>
<br/>
<div class="row">
<div class="col-md-1"></div>
<div class="col-md-6">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc risus est, volutpat quis enim sit amet, lacinia posuere ante. Mauris eget massa efficitur, luctus nisl ut, placerat nibh. Pellentesque id nulla maximus, rutrum dui nec, lobortis odio. Fusce eu enim ac sem auctor congue. Ut ac ullamcorper quam, eget sollicitudin felis. Maecenas posuere sagittis blandit. Proin mollis magna lectus, id gravida est consectetur vitae. Nulla id risus at tellus laoreet finibus in id lacus. Duis lobortis commodo nisl viverra tempor. Curabitur sit amet pretium dui, sit amet tincidunt mauris. Duis volutpat eu purus ut molestie.
</p>
</div>
</div>
\ No newline at end of file
......@@ -111,6 +111,16 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S
"numberChunks" -> numberChunks.getOrElse(1)
) ++ (if (root == null) Map("reference" -> referenceSummary) else Map())
override def reportClass = {
val mappingReport = new MappingReport(this)
mappingReport.outputDir = new File(outputDir, "report")
mappingReport.summaryFile = summaryFile
mappingReport.args = Map(
"sampleId" -> sampleId.getOrElse("."),
"libId" -> libId.getOrElse("."))
Some(mappingReport)
}
/** Will be executed before script */
def init() {
require(outputDir != null, "Missing output directory on mapping module")
......
package nl.lumc.sasc.biopet.pipelines.mapping
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.core.report.{ ReportBuilderExtension, ReportSection, ReportPage, ReportBuilder }
import nl.lumc.sasc.biopet.pipelines.bammetrics.BammetricsReport
import nl.lumc.sasc.biopet.pipelines.flexiprep.FlexiprepReport
class MappingReport(val root: Configurable) extends ReportBuilderExtension {
val builder = MappingReport
}
/**
* Created by pjvanthof on 24/06/15.
*/
object MappingReport extends ReportBuilder {
/** Name of report */
val reportName = "Mapping Report"
/** Root page for single BamMetrcis report */
def indexPage = {
val bamMetricsPage = BammetricsReport.bamMetricsPage(summary, sampleId, libId)
ReportPage(List("QC" -> FlexiprepReport.flexiprepPage) ::: bamMetricsPage.subPages ::: List(
"Versions" -> ReportPage(List(), List((
"Executables" -> ReportSection("/nl/lumc/sasc/biopet/core/report/executables.ssp"
))), Map()),
"Files" -> ReportPage(List(), List(
"Input fastq files" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepInputfiles.ssp"),
"After QC fastq files" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepOutputfiles.ssp"),
"Bam files per lib" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/mapping/outputBamfiles.ssp", Map("sampleLevel" -> false))
), Map())
), List(
"Report" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/mapping/mappingFront.ssp")
) ::: bamMetricsPage.sections,
Map()
)
}
}
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