Commit 2404e328 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Add summary framework to Carp

parent d523db6c
......@@ -17,6 +17,7 @@ package nl.lumc.sasc.biopet.pipelines.carp
import java.io.File
import nl.lumc.sasc.biopet.core.summary.SummaryQScript
import nl.lumc.sasc.biopet.extensions.Ln
import nl.lumc.sasc.biopet.extensions.macs2.Macs2CallPeak
import nl.lumc.sasc.biopet.extensions.picard.MergeSamFiles
......@@ -34,7 +35,7 @@ import nl.lumc.sasc.biopet.pipelines.mapping.Mapping
* Chip-Seq analysis pipeline
* This pipeline performs QC,mapping and peak calling
*/
class Carp(val root: Configurable) extends QScript with MultiSampleQScript {
class Carp(val root: Configurable) extends QScript with MultiSampleQScript with SummaryQScript {
qscript =>
def this() = this(null)
......@@ -42,25 +43,32 @@ class Carp(val root: Configurable) extends QScript with MultiSampleQScript {
"mapping" -> Map("skip_markduplicates" -> true, "aligner" -> "bwa")
), super.defaults)
def summaryFile = new File(outputDir, "Carp.summary.json")
def summaryFiles = Map()
def summaryData = Map()
def makeSample(id: String) = new Sample(id)
class Sample(sampleId: String) extends AbstractSample(sampleId) {
def makeLibrary(id: String) = new Library(id)
class Library(libId: String) extends AbstractLibrary(libId) {
val mapping = new Mapping(qscript)
mapping.libId = Some(libId)
mapping.sampleId = Some(sampleId)
mapping.outputDir = libDir
def addJobs(): Unit = {
if (config.contains("R1")) {
mapping.input_R1 = config("R1")
if (config.contains("R2")) mapping.input_R2 = config("R2")
mapping.libId = Some(libId)
mapping.sampleId = Some(sampleId)
mapping.outputDir = libDir
mapping.init
mapping.biopetScript
addAll(mapping.functions)
} else logger.error("Sample: " + sampleId + ": No R1 found for library: " + libId)
addSummaryQScript(mapping)
}
}
......
Supports Markdown
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