Commit 9dca30a7 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added a check for tophat on index files

parent 27db07f0
......@@ -264,6 +264,16 @@ class Tophat(val root: Configurable) extends BiopetCommandLineFunction with Refe
var rg_platform: Option[String] = config("rg_platform")
override def beforeGraph: Unit = {
if (bowtie1 && !new File(bowtie_index).getParentFile.list().toList
.filter(_.startsWith(new File(bowtie_index).getName)).exists(_.endsWith(".bt2")))
throw new IllegalArgumentException("No bowtie1 index found for tophat")
else if (new File(bowtie_index).getParentFile.list().toList
.filter(_.startsWith(new File(bowtie_index).getName)).exists(_.endsWith(".ebwt")))
throw new IllegalArgumentException("No bowtie2 index found for tophat")
def cmdLine: String = required(executable) +
optional("-o", output_dir) +
conditional(bowtie1, "--bowtie1") +
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