Commit 0ae99234 authored by Sander Bollen's avatar Sander Bollen
Browse files

Merge branch 'improve-error_message' into 'develop'

Added a better error handling on a missing reference.

Small change to better track missing references

See merge request !210
parents 0bca3f1e 002dd1c3
......@@ -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)
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