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

Switch -a and -b for bedtools coverage

parent a0cf806e
......@@ -164,7 +164,7 @@ class BamMetrics(val root: Configurable) extends QScript with SummaryQScript wit
addSummarizable(biopetFlagstatLoose, targetName + "_biopet_flagstat_loose")
add(new BiopetFifoPipe(this, List(biLoose, biopetFlagstatLoose)))
val bedCov = BedtoolsCoverage(this, inputBam, intervals.bed, depth = true)
val bedCov = BedtoolsCoverage(this, intervals.bed, inputBam, depth = true)
val covStats = CoverageStats(this, targetDir, inputBam.getName.stripSuffix(".bam") + ".coverage")
covStats.title = Some("Coverage for " + targetName)
covStats.subTitle = Some(".")
......
......@@ -41,17 +41,11 @@ class BedtoolsCoverage(val root: Configurable) extends Bedtools {
@Argument(doc = "diffStrand", required = false)
var diffStrand: Boolean = false
var inputTag = "-a"
override def beforeCmd() {
if (input.getName.endsWith(".bam")) inputTag = "-abam"
}
override def defaultCoreMemory = 4.0
/** Returns command to execute */
def cmdLine = required(executable) + required("coverage") +
required(inputTag, input) +
required("-a", input) +
required("-b", intersectFile) +
conditional(depth, "-d") +
conditional(sameStrand, "-s") +
......@@ -62,7 +56,7 @@ class BedtoolsCoverage(val root: Configurable) extends Bedtools {
object BedtoolsCoverage {
/** Returns defaul bedtools coverage */
def apply(root: Configurable, input: File, intersect: File, output: Option[File] = None,
depth: Boolean = true, sameStrand: Boolean = false, diffStrand: Boolean = false): BedtoolsCoverage = {
depth: Boolean = false, sameStrand: Boolean = false, diffStrand: Boolean = false): BedtoolsCoverage = {
val bedtoolsCoverage = new BedtoolsCoverage(root)
bedtoolsCoverage.input = input
bedtoolsCoverage.intersectFile = intersect
......
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