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 @@ ...@@ -57,10 +57,10 @@
#{ #{
val rawreport = Map("kraken" -> summary.getValue(sampleId, libId, "gears", "stats", "krakenreport")) 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); loadGears(krakenresult.kraken.classified);
</script> </script>
......
...@@ -9,8 +9,6 @@ class GearsReport(val root: Configurable) extends ReportBuilderExtension { ...@@ -9,8 +9,6 @@ class GearsReport(val root: Configurable) extends ReportBuilderExtension {
object GearsReport extends ReportBuilder { object GearsReport extends ReportBuilder {
// FIXME: Not yet finished
// TODO: Sample specific: Add summary (sunflare plot)
// TODO: Add dustbin analysis (aggregated) // TODO: Add dustbin analysis (aggregated)
// TODO: Add alignment stats per sample for the dustbin analysis // TODO: Add alignment stats per sample for the dustbin analysis
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
package nl.lumc.sasc.biopet.pipelines.mapping package nl.lumc.sasc.biopet.pipelines.mapping
import nl.lumc.sasc.biopet.utils.config.Configurable 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.bammetrics.BammetricsReport
import nl.lumc.sasc.biopet.pipelines.flexiprep.FlexiprepReport import nl.lumc.sasc.biopet.pipelines.flexiprep.FlexiprepReport
...@@ -33,6 +33,11 @@ object MappingReport extends ReportBuilder { ...@@ -33,6 +33,11 @@ object MappingReport extends ReportBuilder {
/** Name of report */ /** Name of report */
val reportName = "Mapping 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 */ /** Root page for single BamMetrcis report */
def indexPage = { def indexPage = {
val skipFlexiprep = summary.getValue(sampleId, libId, "mapping", "settings", "skip_flexiprep").getOrElse(false) == true val skipFlexiprep = summary.getValue(sampleId, libId, "mapping", "settings", "skip_flexiprep").getOrElse(false) == true
...@@ -48,7 +53,11 @@ object MappingReport extends ReportBuilder { ...@@ -48,7 +53,11 @@ object MappingReport extends ReportBuilder {
"After QC fastq files" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepOutputfiles.ssp"))) ::: "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)) List("Bam files per lib" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/mapping/outputBamfiles.ssp", Map("sampleLevel" -> false))
), Map()) ), 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") "Report" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/mapping/mappingFront.ssp")
) ::: bamMetricsPage.map(_.sections).getOrElse(Nil), ) ::: bamMetricsPage.map(_.sections).getOrElse(Nil),
Map() Map()
......
...@@ -36,6 +36,9 @@ class ShivaReport(val root: Configurable) extends ReportBuilderExtension { ...@@ -36,6 +36,9 @@ class ShivaReport(val root: Configurable) extends ReportBuilderExtension {
/** Object for report generation for Shiva pipeline */ /** Object for report generation for Shiva pipeline */
object ShivaReport extends MultisampleReportBuilder { 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 */ /** Root page for the shiva report */
def indexPage = { def indexPage = {
val regions = regionsPage val regions = regionsPage
...@@ -136,10 +139,15 @@ object ShivaReport extends MultisampleReportBuilder { ...@@ -136,10 +139,15 @@ object ShivaReport extends MultisampleReportBuilder {
/** Library page */ /** Library page */
def libraryPage(sampleId: String, libId: String, args: Map[String, Any]): ReportPage = { 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( ReportPage(List(
"Alignment" -> BammetricsReport.bamMetricsPage(summary, Some(sampleId), Some(libId)), "Alignment" -> BammetricsReport.bamMetricsPage(summary, Some(sampleId), Some(libId)),
"QC" -> FlexiprepReport.flexiprepPage "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"), "Alignment" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/bammetrics/alignmentSummary.ssp"),
"QC reads" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"), "QC reads" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepReadSummary.ssp"),
"QC bases" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepBaseSummary.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