Commit 8e728b77 authored by akaljuvee's avatar akaljuvee

-

parent a8e368c6
......@@ -10,6 +10,13 @@
<%@ var outputDir: File %>
#{
val variantCallers = summary.getValue(sampleId, libId, "shivavariantcalling", "settings", "variantcallers").get.asInstanceOf[List[String]]
val pipelineOutputDir = summary.getValue("meta", "output_dir").getOrElse("").toString
def removeDir(value: Option[Any]): Option[Any] = {
value.collect { case a =>
if (a.toString.startsWith(pipelineOutputDir) && pipelineOutputDir.nonEmpty) "./" + a.toString.stripPrefix(pipelineOutputDir + File.separator)
else a
}
}
}#
<div class="panel-body">
......@@ -24,15 +31,15 @@
#if (variantCallers.size > 1)
<tr>
<td>Final (merged)</td>
<td>${ShivaReport.formatVcfFilePath(summary.getValue(sampleId, libId, "shivavariantcalling", "files", "pipeline", "final", "path"))}</td>
<td>${removeDir(summary.getValue(sampleId, libId, "shivavariantcalling", "files", "pipeline", "final", "path"))}</td>
<td>${summary.getValue(sampleId, libId, "shivavariantcalling", "files", "pipeline", "final", "md5")}</td>
</tr>
#end
#for (variantCaller <- variantCallers)
<tr>
<td>${variantCaller}</td>
<td>${ShivaReport.formatVcfFilePath(summary.getValue(sampleId, libId, "shivavariantcalling", "files", "pipeline", variantCaller, "path"))}</td>
<td>${ShivaReport.formatVcfFilePath(summary.getValue(sampleId, libId, "shivavariantcalling", "files", "pipeline", variantCaller, "md5"))}</td>
<td>${removeDir(summary.getValue(sampleId, libId, "shivavariantcalling", "files", "pipeline", variantCaller, "path"))}</td>
<td>${summary.getValue(sampleId, libId, "shivavariantcalling", "files", "pipeline", variantCaller, "md5")}</td>
</tr>
#end
</tbody>
......
......@@ -174,9 +174,4 @@ trait ShivaReportTrait extends MultisampleMappingReportTrait {
plot.runLocal()
}
def formatVcfFilePath(vcfFilePath: Option[Any]): Any = {
//val prefix = summary.getValue("meta", "output_dir").getOrElse("").toString
//vcfFilePath.collect { case a => "./" + a.toString.stripPrefix(prefix + File.separator) }
""
}
}
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