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

Adding simple input files checks

parent 0ae99234
......@@ -47,6 +47,10 @@ trait BiopetQScript extends Configurable with GatkLogging {
var outputFiles: Map[String, File] = Map()
protected case class InputFile(file: File, md5: Option[String] = None)
var inputFiles: List[InputFile] = Nil
/** Get implemented from org.broadinstitute.gatk.queue.QScript */
var qSettings: QSettings
......@@ -85,6 +89,11 @@ trait BiopetQScript extends Configurable with GatkLogging {
globalConfig.writeReport(qSettings.runName, new File(outputDir, ".log/" + qSettings.runName))
else BiopetQScript.addError("Parent of output dir: '" + outputDir.getParent + "' is not writeable, outputdir can not be created")
inputFiles.foreach{ i =>
if (!i.file.exists()) BiopetQScript.addError(s"Input file does not exist: ${i.file}")
if (!i.file.canRead()) BiopetQScript.addError(s"Input file can not be read: ${i.file}")
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