From 81d36084b39442a8d66565940a46aec7a926633c Mon Sep 17 00:00:00 2001
From: Peter van 't Hof <p.j.van_t_hof@lumc.nl>
Date: Tue, 12 Jan 2016 13:25:56 +0100
Subject: [PATCH] Fix reference tag

---
 .../nl/lumc/sasc/biopet/pipelines/carp/CarpReport.scala  | 2 ++
 .../sasc/biopet/pipelines/gentrap/GentrapReport.scala    | 2 ++
 .../pipelines/mapping/MultisampleMappingReport.scala     | 9 +++++----
 .../lumc/sasc/biopet/pipelines/shiva/ShivaReport.scala   | 2 ++
 4 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/public/carp/src/main/scala/nl/lumc/sasc/biopet/pipelines/carp/CarpReport.scala b/public/carp/src/main/scala/nl/lumc/sasc/biopet/pipelines/carp/CarpReport.scala
index e16eff14c..756d1e33d 100644
--- a/public/carp/src/main/scala/nl/lumc/sasc/biopet/pipelines/carp/CarpReport.scala
+++ b/public/carp/src/main/scala/nl/lumc/sasc/biopet/pipelines/carp/CarpReport.scala
@@ -32,4 +32,6 @@ object CarpReport extends MultisampleMappingReportTrait {
   /** Name of the report */
   def reportName = "Carp Report"
   override def frontSection = ReportSection("/nl/lumc/sasc/biopet/pipelines/carp/carpFront.ssp")
+
+  override def pipelineName = "carp"
 }
\ No newline at end of file
diff --git a/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapReport.scala b/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapReport.scala
index 497638604..16b8a6fff 100644
--- a/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapReport.scala
+++ b/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/GentrapReport.scala
@@ -34,4 +34,6 @@ object GentrapReport extends MultisampleMappingReportTrait {
 
   /** Name of the report */
   def reportName = "Gentrap Report"
+
+  override def pipelineName = "gentrap"
 }
\ No newline at end of file
diff --git a/public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingReport.scala b/public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingReport.scala
index 86e16cd0d..71ef4e48a 100644
--- a/public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingReport.scala
+++ b/public/mapping/src/main/scala/nl/lumc/sasc/biopet/pipelines/mapping/MultisampleMappingReport.scala
@@ -21,20 +21,21 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
   /** Front section for the report */
   def frontSection: ReportSection = ReportSection("/nl/lumc/sasc/biopet/pipelines/mapping/multisampleMappingFront.ssp")
 
+  def pipelineName = "multisamplemapping"
+
   /** Root page for the carp report */
   def indexPage = {
-    //Source.fromInputStream(getClass.getResourceAsStream("/nl/lumc/sasc/biopet/pipelines/carp/carpFont.ssp")).foreach(print(_))
     ReportPage(
       List("Samples" -> generateSamplesPage(pageArgs)) ++
         Map("Reference" -> ReportPage(List(), List(
-          "Reference" -> ReportSection("/nl/lumc/sasc/biopet/core/report/reference.ssp", Map("pipeline" -> "shiva"))
+          "Reference" -> ReportSection("/nl/lumc/sasc/biopet/core/report/reference.ssp", Map("pipeline" -> pipelineName))
         ), Map()),
           "Files" -> filesPage,
           "Versions" -> ReportPage(List(), List("Executables" -> ReportSection("/nl/lumc/sasc/biopet/core/report/executables.ssp"
           )), Map())
         ),
       List(
-        "Report" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/carp/carpFront.ssp"),
+        "Report" -> frontSection,
         "Alignment" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp",
           Map("sampleLevel" -> true, "showPlot" -> true, "showTable" -> false)
         ),
@@ -57,7 +58,7 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
     "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)),
     "Preprocessed bam files" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/mapping/outputBamfiles.ssp",
-      Map("pipelineName" -> "shiva", "fileTag" -> "preProcessBam"))), Map())
+      Map("pipelineName" -> pipelineName, "fileTag" -> "preProcessBam"))), Map())
 
   /** Single sample page */
   def samplePage(sampleId: String, args: Map[String, Any]): ReportPage = {
diff --git a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaReport.scala b/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaReport.scala
index c39782d6e..decc33b46 100644
--- a/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaReport.scala
+++ b/public/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaReport.scala
@@ -42,6 +42,8 @@ object ShivaReport extends MultisampleMappingReportTrait {
 
   override def frontSection = ReportSection("/nl/lumc/sasc/biopet/pipelines/shiva/shivaFront.ssp")
 
+  override def pipelineName = "shiva"
+
   override def extFiles = super.extFiles ++ List("js/gears.js")
     .map(x => ExtFile("/nl/lumc/sasc/biopet/pipelines/gears/report/ext/" + x, x))
 
-- 
GitLab