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

Add basic version of bamstats to pipeline

parent 6f32526d
......@@ -16,13 +16,13 @@ package nl.lumc.sasc.biopet.pipelines.bammetrics
import java.io.File
import nl.lumc.sasc.biopet.core.annotations.{ AnnotationRefFlat, RibosomalRefFlat }
import nl.lumc.sasc.biopet.core.annotations.{AnnotationRefFlat, RibosomalRefFlat}
import nl.lumc.sasc.biopet.core.summary.SummaryQScript
import nl.lumc.sasc.biopet.core.{ BiopetFifoPipe, PipelineCommand, Reference, SampleLibraryTag }
import nl.lumc.sasc.biopet.extensions.bedtools.{ BedtoolsCoverage, BedtoolsIntersect, BedtoolsSort }
import nl.lumc.sasc.biopet.core.{BiopetFifoPipe, PipelineCommand, Reference, SampleLibraryTag}
import nl.lumc.sasc.biopet.extensions.bedtools.{BedtoolsCoverage, BedtoolsIntersect, BedtoolsSort}
import nl.lumc.sasc.biopet.extensions.picard._
import nl.lumc.sasc.biopet.extensions.samtools.SamtoolsFlagstat
import nl.lumc.sasc.biopet.extensions.tools.BiopetFlagstat
import nl.lumc.sasc.biopet.extensions.tools.{BamStats, BiopetFlagstat}
import nl.lumc.sasc.biopet.pipelines.bammetrics.scripts.CoverageStats
import nl.lumc.sasc.biopet.utils.config.Configurable
import nl.lumc.sasc.biopet.utils.intervals.BedCheck
......@@ -86,6 +86,11 @@ class BamMetrics(val root: Configurable) extends QScript
add(biopetFlagstat)
addSummarizable(biopetFlagstat, "biopet_flagstat")
val bamStats = new BamStats(this)
bamStats.bamFile = inputBam
bamStats.outputDir = new File(outputDir, "bamstats")
add(bamStats)
val multiMetrics = new CollectMultipleMetrics(this)
multiMetrics.input = inputBam
multiMetrics.outputName = new File(outputDir, inputBam.getName.stripSuffix(".bam"))
......
package nl.lumc.sasc.biopet.extensions.tools
import java.io.File
import nl.lumc.sasc.biopet.core.{Reference, ToolCommandFunction}
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.Input
/**
* Created by pjvanthof on 18/11/2016.
*/
class BamStats(val root: Configurable) extends ToolCommandFunction with Reference {
def toolObject = nl.lumc.sasc.biopet.tools.bamstats.BamStats
@Input(required = true)
var reference: File = _
@Input(required = true)
var bamFile: File = _
var outputDir: File = _
var binSize: Option[Int] = config("bin_size")
var threadBinSize: Option[Int] = config("thread_bin_size")
override def defaultThreads = 3
override def defaultCoreMemory = 5.0
/** Creates command to execute extension */
override def cmdLine = super.cmdLine +
required("-b", bamFile) +
required("-o", outputDir) +
required("-R", reference) +
optional("--binSize", binSize),
optional("--threadBinSize", threadBinSize)
}
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