From 8ab8f962732930268104b7ad504603534edb4a55 Mon Sep 17 00:00:00 2001 From: Peter van 't Hof <p.j.van_t_hof@lumc.nl> Date: Thu, 12 May 2016 08:31:03 +0200 Subject: [PATCH] fix some code warnings --- .../nl/lumc/sasc/biopet/pipelines/GenerateIndexes.scala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/generate-indexes/src/main/scala/nl/lumc/sasc/biopet/pipelines/GenerateIndexes.scala b/generate-indexes/src/main/scala/nl/lumc/sasc/biopet/pipelines/GenerateIndexes.scala index af762ed2d..c97fe218f 100644 --- a/generate-indexes/src/main/scala/nl/lumc/sasc/biopet/pipelines/GenerateIndexes.scala +++ b/generate-indexes/src/main/scala/nl/lumc/sasc/biopet/pipelines/GenerateIndexes.scala @@ -94,7 +94,7 @@ class GenerateIndexes(val root: Configurable) extends QScript with BiopetQScript def commandLine = cmds.mkString(" && ") } - if (fastaUris.length > 1 || fastaFiles.filter(_.getName.endsWith(".gz")).nonEmpty) { + if (fastaUris.length > 1 || fastaFiles.exists(_.getName.endsWith(".gz"))) { fastaFiles.foreach { file => if (file.getName.endsWith(".gz")) { val zcat = new Zcat(this) @@ -159,14 +159,13 @@ class GenerateIndexes(val root: Configurable) extends QScript with BiopetQScript val regex = """.*\/(.*)_vep_(\d*)_(.*)\.tar\.gz""".r vepCacheUri.toString match { - case regex(species, version, assembly) if (version.forall(_.isDigit)) => { + case regex(species, version, assembly) if version.forall(_.isDigit) => outputConfig ++= Map("varianteffectpredictor" -> Map( "species" -> species, "assembly" -> assembly, "cache_version" -> version.toInt, "cache" -> vepDir, "fasta" -> createLinks(vepDir))) - } case _ => throw new IllegalArgumentException("Cache found but no version was found") } } -- GitLab