sampleVariants.ssp 2.72 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
<%@ var showIntro: Boolean = true%>
12
#{
Peter van 't Hof's avatar
Peter van 't Hof committed
13
    val fields = List("Hom", "HomVar", "Het", "HomRef", "NoCall", "Variant", "Total")
14 15 16 17 18 19
    val samples = sampleId match {
        case Some(sample) => List(sample.toString)
        case _ => summary.samples.toList
    }
}#

20 21 22 23 24 25 26 27 28 29 30 31
#if (showIntro)
    <br/>
    <div class="row">
    <div class="col-md-1"></div>
    <div class="col-md-6">
        <p>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc risus est, volutpat quis enim sit amet, lacinia posuere ante. Mauris eget massa efficitur, luctus nisl ut, placerat nibh. Pellentesque id nulla maximus, rutrum dui nec, lobortis odio. Fusce eu enim ac sem auctor congue. Ut ac ullamcorper quam, eget sollicitudin felis. Maecenas posuere sagittis blandit. Proin mollis magna lectus, id gravida est consectetur vitae. Nulla id risus at tellus laoreet finibus in id lacus. Duis lobortis commodo nisl viverra tempor. Curabitur sit amet pretium dui, sit amet tincidunt mauris. Duis volutpat eu purus ut molestie.
        </p>
    </div>
    </div>
#end

32 33
#if (showPlot)
    #{ ShivaReport.variantSummaryPlot(outputDir, "variantSummary", summary, sampleId = sampleId) }#
34 35 36 37
    <div class="panel-body">
        <img src="variantSummary.png" class="img-responsive" />
    </div>
    <div class="panel-footer">
Peter van 't Hof's avatar
Peter van 't Hof committed
38
        #if (showTable)
Peter van 't Hof's avatar
Peter van 't Hof committed
39 40
            <button type="button" class="btn btn-info" data-toggle="collapse" data-target="#variantSummaryTable">Hide table</button>
        #else
Peter van 't Hof's avatar
Peter van 't Hof committed
41 42
            <button type="button" class="btn btn-info" data-toggle="collapse" data-target="#variantSummaryTable">Show table</button>
        #end
43 44
        <i class="glyphicon glyphicon-file"></i> <a href="variantSummary.tsv">tsv file</a>
    </div>
45
#end
46

Peter van 't Hof's avatar
Peter van 't Hof committed
47
<div class="panel-body collapse #if (showTable)in#end" id="variantSummaryTable">
48

Peter van 't Hof's avatar
Peter van 't Hof committed
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
<!-- Table -->
<table class="table sortable-theme-bootstrap" data-sortable>
    <thead><tr><th data-sorted="true" data-sorted-direction="ascending">Sample</th>
        #for (field <- fields) <th>${field}</th> #end
    </tr></thead>
    <tbody>
    #for (sample <- samples.toList.sorted)
    <tr><td><a href="${rootPath}Samples/${sample}/index.html">${sample}</a></td>
        #for (field <- fields)
        <td>${summary.getSampleValue(sample, "shivavariantcalling", "stats", "multisample-vcfstats-final", "genotype", field)}</td>
        #end
    </tr>
    #end
    </tbody>
</table>
</div>