Commit e07f79b0 authored by Sander Bollen's avatar Sander Bollen

Merge branch 'fix-BIOPET-458' into 'develop'

Fixed nullpointer



See merge request !474
parents 98890af0 f78b2c09
...@@ -38,8 +38,6 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript => ...@@ -38,8 +38,6 @@ trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
if (config.contains("output_dir", path = Nil)) config("output_dir", path = Nil).asFile if (config.contains("output_dir", path = Nil)) config("output_dir", path = Nil).asFile
else new File(".") else new File(".")
} }
require(outputDir.canRead, s"No premision to read outputdir: $outputDir")
require(outputDir.canWrite, s"No premision to read outputdir: $outputDir")
@Argument(doc = "Disable all scatters", shortName = "DSC", required = false) @Argument(doc = "Disable all scatters", shortName = "DSC", required = false)
var disableScatter: Boolean = false var disableScatter: Boolean = false
...@@ -161,10 +159,10 @@ object BiopetQScript { ...@@ -161,10 +159,10 @@ object BiopetQScript {
def checkOutputDir(outputDir: File): Unit = { def checkOutputDir(outputDir: File): Unit = {
// Sanity checks // Sanity checks
require(outputDir.getParentFile.canRead, s"No premision to read parent of outputdir: ${outputDir.getParentFile}") require(outputDir.getAbsoluteFile.getParentFile.canRead, s"No premision to read parent of outputdir: ${outputDir.getParentFile}")
require(outputDir.getParentFile.canWrite, s"No premision to write parent of outputdir: ${outputDir.getParentFile}") require(outputDir.getAbsoluteFile.getParentFile.canWrite, s"No premision to write parent of outputdir: ${outputDir.getParentFile}")
outputDir.mkdir() outputDir.mkdir()
require(outputDir.canRead, s"No premision to read outputdir: $outputDir") require(outputDir.getAbsoluteFile.canRead, s"No premision to read outputdir: $outputDir")
require(outputDir.canWrite, s"No premision to write outputdir: $outputDir") require(outputDir.getAbsoluteFile.canWrite, s"No premision to write outputdir: $outputDir")
} }
} }
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