Commit 0453d301 authored by bow's avatar bow
Browse files

Add check to ensure dict file is present in Gentrap

parent 80b0cbcc
......@@ -308,6 +308,13 @@ class Gentrap(val root: Configurable) extends QScript with MultiSampleQScript wi
/** Steps to run before biopetScript */
def init(): Unit = {
// TODO: refactor this out to a submodule (mapping / bammetrics?)
// We require the reference FASTA to be present, and also its companion DICT file
require(config.contains("reference"), "Reference FASTA must be defined")
val refName: File = config("reference")
val dict: File = new File(refName.toString.take(refName.toString.lastIndexOf('.')) + ".dict")
require(dict.exists, s"Dict file '$dict' must exist")
// TODO: validate that exons are flattened or not (depending on another option flag?)
// validate required annotation files
if (expMeasures.contains(FragmentsPerGene))
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