Skip to content
Snippets Groups Projects
Commit 002dd1c3 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added a better error handling on a missing reference.

parent 23bbd96e
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment