outputVcfFiles.ssp 1.87 KB
Newer Older
1
#import(nl.lumc.sasc.biopet.utils.summary.Summary)
2 3 4 5 6 7 8 9 10 11
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
#import(nl.lumc.sasc.biopet.pipelines.bammetrics.BammetricsReport)
#import(java.io.File)
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] = None %>
<%@ var libId: Option[String] = None %>
<%@ var sampleLevel: Boolean = true %>
<%@ var rootPath: String %>
<%@ var outputDir: File %>
#{
Peter van 't Hof's avatar
Peter van 't Hof committed
12
    val variantCallers = summary.getValue(sampleId, libId, "shivavariantcalling", "settings", "variantcallers").get.asInstanceOf[List[String]]
13 14 15
    val pipelineOutputDir = summary.getValue("meta", "output_dir").getOrElse("").toString
    def removeDir(value: Option[Any]): Option[Any] = {
        value.collect { case a =>
16
            if (a.toString.startsWith(pipelineOutputDir) && pipelineOutputDir.nonEmpty) "./" + a.toString.stripPrefix(pipelineOutputDir + File.separator)
17 18 19
            else a
        }
    }
20 21 22 23
}#

<div class="panel-body">
<!-- Table -->
24
<table class="table">
25 26 27 28 29 30 31 32 33
    <thead><tr>
        <th>Variantcaller</th>
        <th>Path</th>
        <th>MD5</th>
    </tr></thead>
    <tbody>
        #if (variantCallers.size > 1)
            <tr>
                <td>Final (merged)</td>
Peter van 't Hof's avatar
Peter van 't Hof committed
34 35
                <td>${removeDir(summary.getValue(sampleId, libId, "shivavariantcalling", "files", "pipeline", "final", "path"))}</td>
                <td>${summary.getValue(sampleId, libId, "shivavariantcalling", "files", "pipeline", "final", "md5")}</td>
36 37 38 39 40
            </tr>
        #end
        #for (variantCaller <- variantCallers)
            <tr>
                <td>${variantCaller}</td>
Peter van 't Hof's avatar
Peter van 't Hof committed
41 42
                <td>${removeDir(summary.getValue(sampleId, libId, "shivavariantcalling", "files", "pipeline", variantCaller, "path"))}</td>
                <td>${summary.getValue(sampleId, libId, "shivavariantcalling", "files", "pipeline", variantCaller, "md5")}</td>
43 44 45 46 47 48
            </tr>
        #end
    </tbody>
</table>

</div>