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

Fixed nullpointer coming from Queue scattering

parent 463d949f
......@@ -48,7 +48,7 @@ trait GATKScatterFunction extends ScatterFunction {
this.includeUnmapped = this.originalGATK.intervalsString.exists(interval => IntervalUtils.isUnmapped(interval))
}
override def isScatterGatherable = {
override def isScatterGatherable: Boolean = {
this.originalGATK.reference_sequence != null
}
......@@ -77,7 +77,7 @@ trait GATKScatterFunction extends ScatterFunction {
/**
* @return true if all interval files exist.
*/
protected def intervalFilesExist = {
protected def intervalFilesExist: Boolean = {
!(this.originalGATK.intervals ++ this.originalGATK.excludeIntervals).exists(interval => !interval.exists())
}
......@@ -90,15 +90,16 @@ trait GATKScatterFunction extends ScatterFunction {
object GATKScatterFunction {
var gatkIntervalsCache = Seq.empty[GATKIntervals]
def getGATKIntervals(originalFunction: CommandLineGATK) = {
def getGATKIntervals(originalFunction: CommandLineGATK): GATKIntervals = {
val gatkIntervals = new GATKIntervals(
originalFunction.reference_sequence,
originalFunction.intervals.toSeq,
originalFunction.intervalsString.toSeq,
originalFunction.interval_set_rule.getOrElse(null),
originalFunction.interval_merging.getOrElse(null),
originalFunction.intervals,
originalFunction.intervalsString,
originalFunction.interval_set_rule.orNull,
originalFunction.interval_merging.orNull,
originalFunction.interval_padding,
originalFunction.excludeIntervals.toSeq, originalFunction.excludeIntervalsString.toSeq)
originalFunction.excludeIntervals,
originalFunction.excludeIntervalsString)
gatkIntervalsCache.find(_ == gatkIntervals) match {
case Some(existingGatkIntervals) => existingGatkIntervals
case None =>
......
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