sampleVariants.ssp 1.26 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 21 22 23 24
#if (showPlot)
    #{ ShivaReport.variantSummaryPlot(outputDir, "variantSummary", summary, sampleId = sampleId) }#
    <img src="variantSummary.png"><br>
    <a href="variantSummary.tsv">Tsv file</a>
#end
#if (showTable)
25 26 27 28 29 30
<table>
<thead><tr><th>Sample</th>
#for (field <- fields) <th>${field}</th> #end
</tr></thead>
<tbody>
    #for (sample <- samples.toList.sorted)
31
        <tr><td><a href="${rootPath}Samples/${sample}/index.html">${sample}</a></td>
32 33 34 35 36 37
        #for (field <- fields)
            <td>${summary.getSampleValue(sample, "shivavariantcalling", "stats", "multisample-vcfstats-final", "genotype", field)}</td>
        #end
        </tr>
    #end
</tbody>
38 39
</table>
#end