Commit 946e1e77 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Move Bam2Wig to multisample mapping

parent 4b084127
...@@ -19,7 +19,6 @@ import nl.lumc.sasc.biopet.core._ ...@@ -19,7 +19,6 @@ import nl.lumc.sasc.biopet.core._
import nl.lumc.sasc.biopet.core.annotations.{RibosomalRefFlat, AnnotationRefFlat} import nl.lumc.sasc.biopet.core.annotations.{RibosomalRefFlat, AnnotationRefFlat}
import nl.lumc.sasc.biopet.core.report.ReportBuilderExtension import nl.lumc.sasc.biopet.core.report.ReportBuilderExtension
import nl.lumc.sasc.biopet.extensions.tools.WipeReads import nl.lumc.sasc.biopet.extensions.tools.WipeReads
import nl.lumc.sasc.biopet.pipelines.bamtobigwig.Bam2Wig
import nl.lumc.sasc.biopet.pipelines.gentrap.Gentrap.{StrandProtocol, ExpMeasures} import nl.lumc.sasc.biopet.pipelines.gentrap.Gentrap.{StrandProtocol, ExpMeasures}
import nl.lumc.sasc.biopet.pipelines.gentrap.measures._ import nl.lumc.sasc.biopet.pipelines.gentrap.measures._
import nl.lumc.sasc.biopet.pipelines.mapping.MultisampleMappingTrait import nl.lumc.sasc.biopet.pipelines.mapping.MultisampleMappingTrait
...@@ -221,13 +220,10 @@ class Gentrap(val root: Configurable) extends QScript ...@@ -221,13 +220,10 @@ class Gentrap(val root: Configurable) extends QScript
require(allPaired || allSingle, s"Sample $sampleId contains only single-end or paired-end libraries") require(allPaired || allSingle, s"Sample $sampleId contains only single-end or paired-end libraries")
// add bigwig output, also per-strand when possible // add bigwig output, also per-strand when possible
//TODO: add Bam2Wig to multisample mapping
preProcessBam.foreach { file => preProcessBam.foreach { file =>
add(Bam2Wig(qscript, file))
executedMeasures.foreach(_.addBamfile(sampleId, file)) executedMeasures.foreach(_.addBamfile(sampleId, file))
shivaVariantcalling.foreach(_.inputBams += sampleId -> file) shivaVariantcalling.foreach(_.inputBams += sampleId -> file)
} }
} }
} }
} }
......
...@@ -8,6 +8,7 @@ import nl.lumc.sasc.biopet.core.{ PipelineCommand, Reference, MultiSampleQScript ...@@ -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.Ln
import nl.lumc.sasc.biopet.extensions.picard.{ MarkDuplicates, MergeSamFiles, AddOrReplaceReadGroups, SamToFastq } 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.bammetrics.BamMetrics
import nl.lumc.sasc.biopet.pipelines.bamtobigwig.Bam2Wig
import nl.lumc.sasc.biopet.utils.Logging import nl.lumc.sasc.biopet.utils.Logging
import nl.lumc.sasc.biopet.utils.config.Configurable import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript import org.broadinstitute.gatk.queue.QScript
...@@ -153,6 +154,8 @@ trait MultisampleMappingTrait extends MultiSampleQScript ...@@ -153,6 +154,8 @@ trait MultisampleMappingTrait extends MultiSampleQScript
bamMetrics.inputBam = bamFile.get bamMetrics.inputBam = bamFile.get
bamMetrics.outputDir = new File(libDir, "metrics") bamMetrics.outputDir = new File(libDir, "metrics")
add(bamMetrics) add(bamMetrics)
if (config("execute_bam2wig", default = true)) add(Bam2Wig(qscript, bamFile.get))
} }
} else logger.warn(s"Sample '$sampleId' does not have any input files") } else logger.warn(s"Sample '$sampleId' does not have any input files")
} }
...@@ -198,6 +201,8 @@ trait MultisampleMappingTrait extends MultiSampleQScript ...@@ -198,6 +201,8 @@ trait MultisampleMappingTrait extends MultiSampleQScript
bamMetrics.inputBam = preProcessBam.get bamMetrics.inputBam = preProcessBam.get
bamMetrics.outputDir = new File(sampleDir, "metrics") bamMetrics.outputDir = new File(sampleDir, "metrics")
add(bamMetrics) add(bamMetrics)
if (config("execute_bam2wig", default = true)) add(Bam2Wig(qscript, preProcessBam.get))
} }
} }
} }
......
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