Commit 2f23e353 authored by Peter van 't Hof's avatar Peter van 't Hof

Added check for outputDir

parent a16e109d
......@@ -57,7 +57,11 @@ object BaseCounter extends ToolCommand {
//Sets picard logging level
htsjdk.samtools.util.Log.setGlobalLogLevel(htsjdk.samtools.util.Log.LogLevel.valueOf(logger.getLevel.toString))
require(cmdArgs.outputDir.exists(), s"Output dir does not exist: ${cmdArgs.outputDir}")
require(cmdArgs.outputDir.isDirectory, s"Output dir is not a dir: ${cmdArgs.outputDir}")
logger.info("Start reading RefFlat file")
val bamReader = SamReaderFactory.makeDefault().open(cmdArgs.bamFile)
val geneReader = GeneAnnotationReader.loadRefFlat(cmdArgs.refFlat, bamReader.getFileHeader.getSequenceDictionary)
bamReader.close()
......
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