Commit 484b342d authored by akaljuvee's avatar akaljuvee

showing sv counts also when only one sample is being displayed

parent 2da5df17
......@@ -2,9 +2,15 @@
#import(nl.lumc.sasc.biopet.utils.summary.Summary)
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] = None %>
<%@ var libId: Option[String] = None %>
<%@ var rootPath: String %>
#{
val sampleNames: List[String] = sampleId match {
case Some(sampleName) => List(sampleName.toString)
case _ => summary.samples.toList.sorted
}
}#
<div class="panel-body">
<!-- Table -->
<table class="table">
......@@ -14,20 +20,20 @@
<th>MD5</th>
</tr></thead>
<tbody>
#if (summary.samples.size > 1)
#if (sampleNames.size > 1)
<tr>
<td>Merged</td>
<td>${ShivaReport.formatVcfFilePath(summary.getValue(sampleId, libId, "shivasvcalling", "files", "pipeline", "final_mergedvcf", "path"))}</td>
<td>${summary.getValue(sampleId, libId, "shivasvcalling", "files", "pipeline", "final_mergedvcf", "md5")}</td>
<td>${ShivaReport.formatVcfFilePath(summary.getValue("shivasvcalling", "files", "pipeline", "final_mergedvcf", "path"))}</td>
<td>${summary.getValue("shivasvcalling", "files", "pipeline", "final_mergedvcf", "md5")}</td>
</tr>
#end
#for (sampleName <- summary.samples.toList.sorted)
#for (sampleName <- sampleNames)
<tr>
<tr>
<td><a href="${rootPath}Samples/${sampleName}/index.html">${sampleName}</a></td>
<td>${ShivaReport.formatVcfFilePath(summary.getValue(sampleId, libId, "shivasvcalling", "files", "pipeline", sampleName, "path"))}</td>
<td>${summary.getValue(sampleId, libId, "shivasvcalling", "files", "pipeline", sampleName, "md5")}</td>
<td>${ShivaReport.formatVcfFilePath(summary.getValue("shivasvcalling", "files", "pipeline", sampleName, "path"))}</td>
<td>${summary.getValue("shivasvcalling", "files", "pipeline", sampleName, "md5")}</td>
</tr>
#end
</tbody>
......
......@@ -2,13 +2,17 @@
#import(java.io.File)
<%@ var rootPath: String %>
<%@ var outputDir: File %>
<%@ var sampleId: Option[String] = None %>
<%@ var summary: Summary %>
<%@ var showPlot: Boolean = false %>
<%@ var showTable: Boolean = true %>
<%@ var showIntro: Boolean = true %>
#{
val sampleNames: List[String] = summary.samples.toList.sorted
val sampleNames: List[String] = sampleId match {
case Some(sampleName) => List(sampleName.toString)
case _ => summary.samples.toList.sorted
}
val counts: Map[String, Map[String, Array[Long]]] = ShivaSvCallingReport.parseSummaryForSvCounts(summary)
val traCounts: Map[String, Long] = ShivaSvCallingReport.parseSummaryForTranslocations(summary)
......
......@@ -111,8 +111,8 @@ trait ShivaReportTrait extends MultisampleMappingReportTrait {
if (!variantcallingExecuted && !svCallingExecuted) super.filesPage
else {
var sections: List[(String, ReportSection)] = List()
if (variantcallingExecuted) sections = sections :+ ("Result files from SNV calling", ReportSection("/nl/lumc/sasc/biopet/pipelines/shiva/outputVcfFiles.ssp", Map("sampleId" -> None)))
if (svCallingExecuted) sections = sections :+ ("Result files from SV calling", ReportSection("/nl/lumc/sasc/biopet/pipelines/shiva/outputVcfFilesSv.ssp"))
if (variantcallingExecuted) sections = sections :+ ("VCF files from SNV calling", ReportSection("/nl/lumc/sasc/biopet/pipelines/shiva/outputVcfFiles.ssp", Map("sampleId" -> None)))
if (svCallingExecuted) sections = sections :+ ("VCF files from SV calling", ReportSection("/nl/lumc/sasc/biopet/pipelines/shiva/outputVcfFilesSv.ssp"))
val oldPage = super.filesPage
oldPage.copy(sections = oldPage.sections ++ sections)
......@@ -121,9 +121,10 @@ trait ShivaReportTrait extends MultisampleMappingReportTrait {
/** Single sample page */
override def samplePage(sampleId: String, args: Map[String, Any]): ReportPage = {
val variantcallingSection = if (variantcallingExecuted) List("Variantcalling" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariants.ssp")) else Nil
val variantcallingSection = if (variantcallingExecuted) List("SNV Calling" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariants.ssp")) else Nil
val svSection = if (svCallingExecuted) List("SV Calling" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariantsSv.ssp")) else Nil
val oldPage = super.samplePage(sampleId, args)
oldPage.copy(sections = variantcallingSection ++ oldPage.sections)
oldPage.copy(sections = variantcallingSection ++ svSection ++ oldPage.sections)
}
/** Name of the report */
......
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