Commit 72d9f008 authored by Peter van 't Hof's avatar Peter van 't Hof

Added insertsize plot

parent 7469830b
#import(nl.lumc.sasc.biopet.core.summary.Summary)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] %>
<%@ var libId: Option[String] = None %>
<%@ var rootPath: String %>
<%@ var metricsTag: String = "bammetrics" %>
<%@ var fields: List[String] = List("All", "Mapped", "Duplicates", "MAPQ>30", "MateUnmapped", "Mate on other chr")%>
<table>
<tbody>
#for (field <- fields)
<tr><th>${field}</th><td>
#if (libId.isDefined)
${summary.getLibraryValue(sampleId.get, libId.get, metricsTag, "stats", "biopet_flagstat", field)}
#else
${summary.getSampleValue(sampleId.get, metricsTag, "stats", "biopet_flagstat", field)}
#end
</td></tr>
#end
</tbody>
</table>
#{ //TODO: Need content }#
#import(nl.lumc.sasc.biopet.core.summary.Summary)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
#import(java.io.File)
#import(org.apache.commons.io.FileUtils)
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] %>
<%@ var libId: Option[String] = None %>
<%@ var rootPath: String %>
<%@ var metricsTag: String = "bammetrics" %>
<%@ var outputDir: File %>
<%@ var fields: List[String] = List("mean_insert_size", "standard_deviation", "median_insert_size")%>
Todo
\ No newline at end of file
#{
def getPlot = {
(if (libId.isDefined) summary.getLibraryValue(sampleId.get, libId.get, metricsTag, "files", "insert_size_metrics", "output_histogram", "path")
else summary.getSampleValue(sampleId.get, metricsTag, "files", "insert_size_metrics", "output_histogram", "path")).collect {
case value => {
val file = new File(value.toString)
val newFile = new File(outputDir, file.getName)
FileUtils.copyFile(file, newFile)
newFile.getName
}
}
}
}#
<iframe src="${getPlot}" style="width:400px; height:400px;" frameborder="0"></iframe>
<table>
<tbody>
#for (field <- fields)
<tr><th>${field}</th><td>
#if (libId.isDefined)
${summary.getLibraryValue(sampleId.get, libId.get, metricsTag, "stats", "insert_size_metrics", field)}
#else
${summary.getSampleValue(sampleId.get, metricsTag, "stats", "insert_size_metrics", field)}
#end
</td></tr>
#end
</tbody>
</table>
......@@ -20,7 +20,7 @@ object BammetricsReport extends ReportBuilder {
Map(),
List(
"Summary" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp"),
"Flagstat" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/bammetrics/flagstat.ssp"),
"Bam Stats" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/bammetrics/bamStats.ssp"),
"Insert Size" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/bammetrics/insertSize.ssp"),
"GC Bias" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/bammetrics/gcBias.ssp")
),
......
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