Commit a25cc635 authored by Peter van 't Hof's avatar Peter van 't Hof

Adding possibility to change metrics on preprocess bam

parent 9869bfcd
......@@ -61,6 +61,8 @@ class Carp(val root: Configurable) extends QScript with MultisampleMappingTrait
override def preProcessBam = Some(createFile("filter.bam"))
override def metricsPreprogressBam = false
val controls: List[String] = config("control", default = Nil)
override def summarySettings = super.summarySettings ++ Map("controls" -> controls)
......
......@@ -90,6 +90,8 @@ trait MultisampleMappingTrait extends MultiSampleQScript
def makeSample(id: String) = new Sample(id)
class Sample(sampleId: String) extends AbstractSample(sampleId) { sample =>
def metricsPreprogressBam = true
def makeLibrary(id: String) = new Library(id)
class Library(libId: String) extends AbstractLibrary(libId) { lib =>
......@@ -263,7 +265,7 @@ trait MultisampleMappingTrait extends MultiSampleQScript
if (mergeStrategy != MergeStrategy.None && libraries.flatMap(_._2.bamFile).nonEmpty) {
val bamMetrics = new BamMetrics(qscript)
bamMetrics.sampleId = Some(sampleId)
bamMetrics.inputBam = preProcessBam.get
bamMetrics.inputBam = if (metricsPreprogressBam) preProcessBam.get else bamFile.get
bamMetrics.outputDir = new File(sampleDir, "metrics")
add(bamMetrics)
......
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