Skip to content
Snippets Groups Projects
Commit 89bc7d9a authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added sunburst plot to mapping and shiva

parent 9ac622a9
No related branches found
No related tags found
No related merge requests found
......@@ -57,10 +57,10 @@
#{
val rawreport = Map("kraken" -> summary.getValue(sampleId, libId, "gears", "stats", "krakenreport"))
val bla = ConfigUtils.mapToJson(rawreport)
val jsonReport = ConfigUtils.mapToJson(rawreport)
}#
var krakenresult = JSON.parse('<%= unescape(bla) %>');
var krakenresult = JSON.parse('<%= unescape(jsonReport) %>');
loadGears(krakenresult.kraken.classified);
</script>
......
......@@ -9,8 +9,6 @@ class GearsReport(val root: Configurable) extends ReportBuilderExtension {
object GearsReport extends ReportBuilder {
// FIXME: Not yet finished
// TODO: Sample specific: Add summary (sunflare plot)
// TODO: Add dustbin analysis (aggregated)
// TODO: Add alignment stats per sample for the dustbin analysis
......
......@@ -16,7 +16,7 @@
package nl.lumc.sasc.biopet.pipelines.mapping
import nl.lumc.sasc.biopet.utils.config.Configurable
import nl.lumc.sasc.biopet.core.report.{ ReportBuilderExtension, ReportSection, ReportPage, ReportBuilder }
import nl.lumc.sasc.biopet.core.report._
import nl.lumc.sasc.biopet.pipelines.bammetrics.BammetricsReport
import nl.lumc.sasc.biopet.pipelines.flexiprep.FlexiprepReport
......@@ -33,6 +33,11 @@ object MappingReport extends ReportBuilder {
/** Name of report */
val reportName = "Mapping Report"
override def extFiles = super.extFiles ++ List("js/gears.js")
.map(x => ExtFile("/nl/lumc/sasc/biopet/pipelines/gears/report/ext/" + x, x))
def krakenExecuted = summary.getValue(sampleId, libId, "gears", "stats", "krakenreport").isDefined
/** Root page for single BamMetrcis report */
def indexPage = {
val skipFlexiprep = summary.getValue(sampleId, libId, "mapping", "settings", "skip_flexiprep").getOrElse(false) == true
......@@ -48,7 +53,11 @@ object MappingReport extends ReportBuilder {
"After QC fastq files" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepOutputfiles.ssp"))) :::
List("Bam files per lib" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/mapping/outputBamfiles.ssp", Map("sampleLevel" -> false))
), Map())
), List(
) :::
(if (krakenExecuted) List("Gears - Metagenomics" -> ReportPage(List(), List(
"Sunburst analysis" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/gearsSunburst.ssp"
)), Map()))
else Nil), List(
"Report" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/mapping/mappingFront.ssp")
) ::: bamMetricsPage.map(_.sections).getOrElse(Nil),
Map()
......
......@@ -36,6 +36,9 @@ class ShivaReport(val root: Configurable) extends ReportBuilderExtension {
/** Object for report generation for Shiva pipeline */
object ShivaReport extends MultisampleReportBuilder {
override def extFiles = super.extFiles ++ List("js/gears.js")
.map(x => ExtFile("/nl/lumc/sasc/biopet/pipelines/gears/report/ext/" + x, x))
/** Root page for the shiva report */
def indexPage = {
val regions = regionsPage
......@@ -136,10 +139,15 @@ object ShivaReport extends MultisampleReportBuilder {
/** Library page */
def libraryPage(sampleId: String, libId: String, args: Map[String, Any]): ReportPage = {
def krakenExecuted = summary.getValue(Some(sampleId), Some(libId), "gears", "stats", "krakenreport").isDefined
ReportPage(List(
"Alignment" -> BammetricsReport.bamMetricsPage(summary, Some(sampleId), Some(libId)),
"QC" -> FlexiprepReport.flexiprepPage
), List(
) ::: (if (krakenExecuted) List("Gears - Metagenomics" -> ReportPage(List(), List(
"Sunburst analysis" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/gears/gearsSunburst.ssp"
)), Map()))
else Nil), List(
"Alignment" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp"),
"QC reads" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"),
"QC bases" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.ssp")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment