Commit cdc3eea0 authored by Peter van 't Hof's avatar Peter van 't Hof

Added index check

parent 2f23e353
......@@ -63,6 +63,7 @@ object BaseCounter extends ToolCommand {
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