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

Fixed unknown executables

parent db4dcbca
...@@ -43,7 +43,7 @@ trait GatkGeneral extends CommandLineGATK with CommandLineResources with Referen ...@@ -43,7 +43,7 @@ trait GatkGeneral extends CommandLineGATK with CommandLineResources with Referen
def versionCommand = "java" + " -jar " + jarFile + " -version" def versionCommand = "java" + " -jar " + jarFile + " -version"
override def getVersion = { override def getVersion = {
executable = BiopetCommandLineFunction.preProcessExecutable(executable).path BiopetCommandLineFunction.preProcessExecutable(executable).path.foreach(executable = _)
super.getVersion.collect { case v => "Gatk " + v } super.getVersion.collect { case v => "Gatk " + v }
} }
} }
...@@ -99,7 +99,7 @@ trait BiopetCommandLineFunction extends CommandLineResources { biopetFunction => ...@@ -99,7 +99,7 @@ trait BiopetCommandLineFunction extends CommandLineResources { biopetFunction =>
*/ */
protected[core] def preProcessExecutable() { protected[core] def preProcessExecutable() {
val exe = BiopetCommandLineFunction.preProcessExecutable(executable) val exe = BiopetCommandLineFunction.preProcessExecutable(executable)
executable = exe.path exe.path.foreach(executable = _)
addJobReportBinding("md5sum_exe", exe.md5.getOrElse("N/A")) addJobReportBinding("md5sum_exe", exe.md5.getOrElse("N/A"))
} }
...@@ -199,7 +199,7 @@ object BiopetCommandLineFunction extends Logging { ...@@ -199,7 +199,7 @@ object BiopetCommandLineFunction extends Logging {
private[core] val executableMd5Cache: mutable.Map[String, String] = mutable.Map() private[core] val executableMd5Cache: mutable.Map[String, String] = mutable.Map()
private[core] val executableCache: mutable.Map[String, String] = mutable.Map() private[core] val executableCache: mutable.Map[String, String] = mutable.Map()
case class Executable(path: String, md5: Option[String]) case class Executable(path: Option[String], md5: Option[String])
def preProcessExecutable(executable: String): Executable = { def preProcessExecutable(executable: String): Executable = {
if (!BiopetCommandLineFunction.executableMd5Cache.contains(executable)) { if (!BiopetCommandLineFunction.executableMd5Cache.contains(executable)) {
if (executable != null) { if (executable != null) {
...@@ -236,7 +236,7 @@ object BiopetCommandLineFunction extends Logging { ...@@ -236,7 +236,7 @@ object BiopetCommandLineFunction extends Logging {
} }
} }
} }
Executable(BiopetCommandLineFunction.executableCache(executable), Executable(BiopetCommandLineFunction.executableCache.get(executable),
BiopetCommandLineFunction.executableMd5Cache.get(executable)) BiopetCommandLineFunction.executableMd5Cache.get(executable))
} }
} }
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