Commit 0ecd6778 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added gears to multi mapping

parent 95882d8e
......@@ -264,11 +264,10 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S
if (config("unmapped_to_gears", default = false).asBoolean) {
val gears = new GearsSingle(this)
gears.bamFile = Some(finalBamFile)
gears.sampleId = sampleId
gears.libId = libId
gears.outputDir = new File(outputDir, "gears")
gears.init()
gears.biopetScript()
addAll(gears.functions)
addSummaryQScript(gears)
add(gears)
}
if (config("generate_wig", default = false).asBoolean)
......
......@@ -8,6 +8,7 @@ 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 }
import nl.lumc.sasc.biopet.pipelines.bammetrics.BamMetrics
import nl.lumc.sasc.biopet.pipelines.gears.GearsSingle
import nl.lumc.sasc.biopet.utils.Logging
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
......@@ -199,6 +200,14 @@ trait MultisampleMappingTrait extends MultiSampleQScript
bamMetrics.outputDir = new File(sampleDir, "metrics")
add(bamMetrics)
}
if (config("unmapped_to_gears", default = false) && libraries.flatMap(_._2.bamFile).nonEmpty) {
val gears = new GearsSingle(qscript)
gears.bamFile = preProcessBam
gears.sampleId = Some(sampleId)
gears.outputDir = new File(sampleDir, "gears")
add(gears)
}
}
}
}
......
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