sampleVariants.ssp 1.64 KB
Newer Older
1 2
#import(nl.lumc.sasc.biopet.core.summary.Summary)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
3 4
#import(nl.lumc.sasc.biopet.pipelines.shiva.ShivaReport)
#import(java.io.File)
5 6
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] = None %>
7
<%@ var rootPath: String %>
8 9 10
<%@ var outputDir: File %>
<%@ var showPlot: Boolean = false %>
<%@ var showTable: Boolean = true %>
11 12 13 14 15 16 17 18
#{
    val fields = List("Hom", "HomVar", "HomRef", "NoCall", "Variant", "NonInformative", "Total")
    val samples = sampleId match {
        case Some(sample) => List(sample.toString)
        case _ => summary.samples.toList
    }
}#

19 20
#if (showPlot)
    #{ ShivaReport.variantSummaryPlot(outputDir, "variantSummary", summary, sampleId = sampleId) }#
21 22 23 24 25 26
    <div class="panel-body">
        <img src="variantSummary.png" class="img-responsive" />
    </div>
    <div class="panel-footer">
        <i class="glyphicon glyphicon-file"></i> <a href="variantSummary.tsv">tsv file</a>
    </div>
27 28
#end
#if (showTable)
29 30 31 32
    <div class="panel-body">

    <!-- Table -->
    <table class="table sortable-theme-bootstrap" data-sortable>
33
        <thead><tr><th data-sorted="true" data-sorted-direction="ascending">Sample</th>
34 35 36 37
            #for (field <- fields) <th>${field}</th> #end
        </tr></thead>
        <tbody>
        #for (sample <- samples.toList.sorted)
38
        <tr><td><a href="${rootPath}Samples/${sample}/index.html">${sample}</a></td>
39
            #for (field <- fields)
40
            <td>${summary.getSampleValue(sample, "shivavariantcalling", "stats", "multisample-vcfstats-final", "genotype", field)}</td>
41
            #end
42
        </tr>
43 44 45 46 47
        #end
        </tbody>
    </table>
    </div>

48
#end