Commit 9034e179 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Fixed report types

parent 56766d98
......@@ -18,6 +18,7 @@ package nl.lumc.sasc.biopet.pipelines.carp
import java.io.File
import nl.lumc.sasc.biopet.core._
import nl.lumc.sasc.biopet.core.report.ReportBuilderExtension
import nl.lumc.sasc.biopet.extensions.macs2.Macs2CallPeak
import nl.lumc.sasc.biopet.extensions.picard.BuildBamIndex
import nl.lumc.sasc.biopet.extensions.samtools.SamtoolsView
......@@ -95,7 +96,7 @@ class Carp(val root: Configurable) extends QScript with MultisampleMappingTrait
}
}
override def reportClass = {
override def reportClass: Option[ReportBuilderExtension] = {
val carp = new CarpReport(this)
carp.outputDir = new File(outputDir, "report")
carp.summaryFile = summaryFile
......
......@@ -15,7 +15,7 @@
*/
package nl.lumc.sasc.biopet.pipelines.carp
import nl.lumc.sasc.biopet.core.report.{ReportSection, ReportBuilderExtension}
import nl.lumc.sasc.biopet.core.report.{ ReportSection, ReportBuilderExtension }
import nl.lumc.sasc.biopet.pipelines.mapping.MultisampleMappingReportTrait
import nl.lumc.sasc.biopet.utils.config.Configurable
......
......@@ -15,7 +15,7 @@
*/
package nl.lumc.sasc.biopet.pipelines.gentrap
import nl.lumc.sasc.biopet.core.report.{ReportBuilderExtension, ReportSection}
import nl.lumc.sasc.biopet.core.report.{ ReportBuilderExtension, ReportSection }
import nl.lumc.sasc.biopet.pipelines.mapping.MultisampleMappingReportTrait
import nl.lumc.sasc.biopet.utils.config.Configurable
......
package nl.lumc.sasc.biopet.pipelines.mapping
import nl.lumc.sasc.biopet.core.report.{ReportBuilderExtension, ReportSection, ReportPage, MultisampleReportBuilder}
import nl.lumc.sasc.biopet.core.report.{ ReportBuilderExtension, ReportSection, ReportPage, MultisampleReportBuilder }
import nl.lumc.sasc.biopet.pipelines.bammetrics.BammetricsReport
import nl.lumc.sasc.biopet.pipelines.flexiprep.FlexiprepReport
import nl.lumc.sasc.biopet.utils.config.Configurable
/**
* Created by pjvanthof on 11/01/16.
*/
* Created by pjvanthof on 11/01/16.
*/
class MultisampleMappingReport(val root: Configurable) extends ReportBuilderExtension {
def builder = MultisampleMappingReport
}
......@@ -57,8 +57,7 @@ trait MultisampleMappingReportTrait extends MultisampleReportBuilder {
"After QC fastq files" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/flexiprep/flexiprepOutputfiles.ssp"),
"Bam files per lib" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/mapping/outputBamfiles.ssp", Map("sampleLevel" -> false)),
"Preprocessed bam files" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/mapping/outputBamfiles.ssp",
Map("pipelineName" -> "shiva", "fileTag" -> "preProcessBam")))
, Map())
Map("pipelineName" -> "shiva", "fileTag" -> "preProcessBam"))), Map())
/** Single sample page */
def samplePage(sampleId: String, args: Map[String, Any]): ReportPage = {
......
......@@ -3,6 +3,7 @@ package nl.lumc.sasc.biopet.pipelines.mapping
import java.io.File
import htsjdk.samtools.SamReaderFactory
import nl.lumc.sasc.biopet.core.report.ReportBuilderExtension
import nl.lumc.sasc.biopet.core.{ PipelineCommand, Reference, MultiSampleQScript }
import nl.lumc.sasc.biopet.extensions.Ln
import nl.lumc.sasc.biopet.extensions.picard.{ MarkDuplicates, MergeSamFiles, AddOrReplaceReadGroups, SamToFastq }
......@@ -37,7 +38,7 @@ trait MultisampleMappingTrait extends MultiSampleQScript
addSummaryJobs()
}
override def reportClass = {
override def reportClass: Option[ReportBuilderExtension] = {
val report = new MultisampleMappingReport(this)
report.outputDir = new File(outputDir, "report")
report.summaryFile = summaryFile
......
......@@ -15,13 +15,13 @@
*/
package nl.lumc.sasc.biopet.pipelines.shiva
import java.io.{File, PrintWriter}
import java.io.{ File, PrintWriter }
import nl.lumc.sasc.biopet.core.report._
import nl.lumc.sasc.biopet.pipelines.mapping.MultisampleMappingReportTrait
import nl.lumc.sasc.biopet.utils.config.Configurable
import nl.lumc.sasc.biopet.utils.rscript.StackedBarPlot
import nl.lumc.sasc.biopet.utils.summary.{Summary, SummaryValue}
import nl.lumc.sasc.biopet.utils.summary.{ Summary, SummaryValue }
/**
* With this extension the report is executed within a pipeline
......@@ -100,7 +100,8 @@ object ShivaReport extends MultisampleMappingReportTrait {
/** Files page, can be used general or at sample level */
override def filesPage: ReportPage = {
val vcfFilesSection = if (variantcallingExecuted) List("VCF files" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/shiva/outputVcfFiles.ssp",
Map("sampleId" -> None))) else Nil
Map("sampleId" -> None)))
else Nil
val oldPage = super.filesPage
oldPage.copy(sections = oldPage.sections ++ vcfFilesSection)
}
......
......@@ -16,8 +16,9 @@
package nl.lumc.sasc.biopet.pipelines.shiva
import nl.lumc.sasc.biopet.core.Reference
import nl.lumc.sasc.biopet.core.report.ReportBuilderExtension
import nl.lumc.sasc.biopet.pipelines.bammetrics.TargetRegions
import nl.lumc.sasc.biopet.pipelines.mapping.{ MultisampleMappingTrait }
import nl.lumc.sasc.biopet.pipelines.mapping.MultisampleMappingTrait
import nl.lumc.sasc.biopet.pipelines.toucan.Toucan
import org.broadinstitute.gatk.queue.QScript
......@@ -28,7 +29,7 @@ import org.broadinstitute.gatk.queue.QScript
*/
trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegions { qscript: QScript =>
override def reportClass = {
override def reportClass: Option[ReportBuilderExtension] = {
val shiva = new ShivaReport(this)
shiva.outputDir = new File(outputDir, "report")
shiva.summaryFile = summaryFile
......
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