Commit 4ddb5a93 authored by bow's avatar bow

Merge branch 'fix-basecounter' into 'develop'

Fix basecounter

Fixes #377 and #378 

See merge request !440
parents a16e109d cdc3eea0
......@@ -57,8 +57,13 @@ 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)
require(bamReader.hasIndex, "Bamfile require an index")
val geneReader = GeneAnnotationReader.loadRefFlat(cmdArgs.refFlat, bamReader.getFileHeader.getSequenceDictionary)
bamReader.close()
logger.info("Done reading RefFlat file")
......
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