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

Merge branch 'fix-bowtie2-indexfiles' into 'develop'

Fix bug when bowtie2 is not able to find reference files ending with .bt2l

See merge request !354
parents ede07209 d2e68c89
......@@ -135,7 +135,12 @@ class Bowtie2(val root: Configurable) extends BiopetCommandLineFunction with Ref
val indexDir = new File(bowtieIndex).getParentFile
val basename = bowtieIndex.stripPrefix(indexDir.getPath + File.separator)
if (indexDir.exists()) {
if (!indexDir.list().toList.filter(_.startsWith(basename)).exists(_.endsWith(".bt2")))
if (!indexDir.list()
.exists({ p =>
p.endsWith(".bt2") || p.endsWith(".bt2l")
Logging.addError(s"No index files found for bowtie2 in: $indexDir with basename: $basename")
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