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

Renamed class because of decrapation

parent bae8c53d
...@@ -136,7 +136,7 @@ class BamMetrics(val root: Configurable) extends QScript ...@@ -136,7 +136,7 @@ class BamMetrics(val root: Configurable) extends QScript
ampBedToInterval.isIntermediate = true ampBedToInterval.isIntermediate = true
add(ampBedToInterval) add(ampBedToInterval)
val chsMetrics = CalculateHsMetrics(this, inputBam, val chsMetrics = CollectHsMetrics(this, inputBam,
List(ampIntervals), ampIntervals :: roiIntervals.map(_.intervals), outputDir) List(ampIntervals), ampIntervals :: roiIntervals.map(_.intervals), outputDir)
add(chsMetrics) add(chsMetrics)
addSummarizable(chsMetrics, "hs_metrics") addSummarizable(chsMetrics, "hs_metrics")
......
...@@ -75,7 +75,7 @@ class BamMetricsTest extends TestNGSuite with Matchers { ...@@ -75,7 +75,7 @@ class BamMetricsTest extends TestNGSuite with Matchers {
bammetrics.functions.count(_.isInstanceOf[CollectRnaSeqMetrics]) shouldBe (if (rna) 1 else 0) bammetrics.functions.count(_.isInstanceOf[CollectRnaSeqMetrics]) shouldBe (if (rna) 1 else 0)
bammetrics.functions.count(_.isInstanceOf[CollectWgsMetrics]) shouldBe (if (wgs) 1 else 0) bammetrics.functions.count(_.isInstanceOf[CollectWgsMetrics]) shouldBe (if (wgs) 1 else 0)
bammetrics.functions.count(_.isInstanceOf[CollectMultipleMetrics]) shouldBe 1 bammetrics.functions.count(_.isInstanceOf[CollectMultipleMetrics]) shouldBe 1
bammetrics.functions.count(_.isInstanceOf[CalculateHsMetrics]) shouldBe (if (amplicon) 1 else 0) bammetrics.functions.count(_.isInstanceOf[CollectHsMetrics]) shouldBe (if (amplicon) 1 else 0)
bammetrics.functions.count(_.isInstanceOf[CollectTargetedPcrMetrics]) shouldBe (if (amplicon) 1 else 0) bammetrics.functions.count(_.isInstanceOf[CollectTargetedPcrMetrics]) shouldBe (if (amplicon) 1 else 0)
bammetrics.functions.count(_.isInstanceOf[BamStats]) shouldBe 1 bammetrics.functions.count(_.isInstanceOf[BamStats]) shouldBe 1
} }
......
...@@ -22,8 +22,8 @@ import nl.lumc.sasc.biopet.core.summary.Summarizable ...@@ -22,8 +22,8 @@ import nl.lumc.sasc.biopet.core.summary.Summarizable
import org.broadinstitute.gatk.utils.commandline.{ Argument, Input, Output } import org.broadinstitute.gatk.utils.commandline.{ Argument, Input, Output }
/** Extension for picard CalculateHsMetrics */ /** Extension for picard CalculateHsMetrics */
class CalculateHsMetrics(val root: Configurable) extends Picard with Summarizable with Reference { class CollectHsMetrics(val root: Configurable) extends Picard with Summarizable with Reference {
javaMainClass = new picard.analysis.directed.CalculateHsMetrics().getClass.getName javaMainClass = new picard.analysis.directed.CollectHsMetrics().getClass.getName
@Input(doc = "The input SAM or BAM files to analyze. Must be coordinate sorted.", required = true) @Input(doc = "The input SAM or BAM files to analyze. Must be coordinate sorted.", required = true)
var input: File = _ var input: File = _
...@@ -72,14 +72,14 @@ class CalculateHsMetrics(val root: Configurable) extends Picard with Summarizabl ...@@ -72,14 +72,14 @@ class CalculateHsMetrics(val root: Configurable) extends Picard with Summarizabl
def summaryStats: Any = Picard.getMetrics(output).getOrElse(Map()) def summaryStats: Any = Picard.getMetrics(output).getOrElse(Map())
} }
object CalculateHsMetrics { object CollectHsMetrics {
/** Returns default CalculateHsMetrics */ /** Returns default CalculateHsMetrics */
def apply(root: Configurable, def apply(root: Configurable,
input: File, input: File,
baitIntervals: List[File], baitIntervals: List[File],
targetIntervals: List[File], targetIntervals: List[File],
outputDir: File): CalculateHsMetrics = { outputDir: File): CollectHsMetrics = {
val calculateHsMetrics = new CalculateHsMetrics(root) val calculateHsMetrics = new CollectHsMetrics(root)
calculateHsMetrics.input = input calculateHsMetrics.input = input
calculateHsMetrics.baitIntervals = baitIntervals calculateHsMetrics.baitIntervals = baitIntervals
calculateHsMetrics.targetIntervals = targetIntervals calculateHsMetrics.targetIntervals = targetIntervals
......
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