From 002dd1c3d248604b5c5ce29a321c4d38d570cf37 Mon Sep 17 00:00:00 2001 From: Peter van 't Hof <p.j.van_t_hof@lumc.nl> Date: Wed, 12 Aug 2015 16:17:04 +0200 Subject: [PATCH] Added a better error handling on a missing reference. --- .../src/main/scala/nl/lumc/sasc/biopet/core/Reference.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/Reference.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/Reference.scala index d6aca7975..d3ae0023a 100644 --- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/Reference.scala +++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/Reference.scala @@ -94,12 +94,12 @@ trait Reference extends Configurable { ) } - //TODO: this become obsolete when index get autogenerated + //TODO: this become obsolete when index get auto generated /** Check fasta file if file exist and index file are there */ def checkFasta(file: File): Unit = { if (!Reference.checked.contains(file)) { - require(file.exists(), "Reference not found: " + file) + if (!file.exists()) BiopetQScript.addError(s"Reference not found: $file, species: $referenceSpecies, name: $referenceName, configValue: " + config("reference_fasta")) if (dictRequired) Reference.requireDict(file) if (faiRequired) Reference.requireFai(file) -- GitLab