#import(nl.lumc.sasc.biopet.utils.IoUtils)
#import(nl.lumc.sasc.biopet.utils.summary.Summary)
#import(nl.lumc.sasc.biopet.core.report.ReportPage)
#import(org.apache.commons.io.FileUtils)
#import(java.io.File)
<%@ var summary: Summary %>
<%@ var sampleId: Option[String] %>
<%@ var libId: Option[String] = None %>
<%@ var outputDir: File %>
<%@ var metricsTag: String = "bammetrics" %>
<%@ var target: Option[String] %>
#{
val originalPlot = new File(summary.getValue(sampleId, libId, metricsTag, "files", target.get + "_cov_stats", "plot", "path")
.getOrElse(throw new IllegalArgumentException("No plot found in summary")).toString)
val plot = new File(outputDir, target.get + "_cov_stats.png")
val values = summary.getValue(sampleId, libId, metricsTag, "stats", target.get + "_cov_stats", "coverage", "_all")
.getOrElse(throw new IllegalArgumentException("No plot found in summary")).asInstanceOf[Map[String, Any]]
if (originalPlot.exists()) IoUtils.copyFile(originalPlot, plot)
}#
mean | median | max | horizontal | frac min 10x | frac min 20x | frac min 30x | frac min 40x | frac min 50x |
---|---|---|---|---|---|---|---|---|
${values.get("mean")} | ${values.get("median")} | ${values.get("max")} | ${values.get("horizontal")} | ${values.get("frac_min_10x")} | ${values.get("frac_min_20x")} | ${values.get("frac_min_30x")} | ${values.get("frac_min_40x")} | ${values.get("frac_min_50x")} |