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

Fixed compile error

parent bff12a5f
...@@ -16,14 +16,14 @@ package nl.lumc.sasc.biopet.core ...@@ -16,14 +16,14 @@ package nl.lumc.sasc.biopet.core
import java.io.File import java.io.File
import nl.lumc.sasc.biopet.core.summary.{SummaryQScript, WriteSummary} import nl.lumc.sasc.biopet.core.summary.{ SummaryQScript, WriteSummary }
import nl.lumc.sasc.biopet.utils.config.Configurable import nl.lumc.sasc.biopet.utils.config.Configurable
import nl.lumc.sasc.biopet.core.report.ReportBuilderExtension import nl.lumc.sasc.biopet.core.report.ReportBuilderExtension
import nl.lumc.sasc.biopet.core.workaround.BiopetQCommandLine import nl.lumc.sasc.biopet.core.workaround.BiopetQCommandLine
import nl.lumc.sasc.biopet.utils.Logging import nl.lumc.sasc.biopet.utils.Logging
import org.broadinstitute.gatk.queue.{QScript, QSettings} import org.broadinstitute.gatk.queue.{ QScript, QSettings }
import org.broadinstitute.gatk.queue.function.QFunction import org.broadinstitute.gatk.queue.function.QFunction
import org.broadinstitute.gatk.queue.util.{Logging => GatkLogging} import org.broadinstitute.gatk.queue.util.{ Logging => GatkLogging }
/** Base for biopet pipeline */ /** Base for biopet pipeline */
trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript => trait BiopetQScript extends Configurable with GatkLogging { qscript: QScript =>
...@@ -177,5 +177,4 @@ object BiopetQScript { ...@@ -177,5 +177,4 @@ object BiopetQScript {
require(outputDir.getAbsoluteFile.canWrite, s"No premision to write outputdir: $outputDir") require(outputDir.getAbsoluteFile.canWrite, s"No premision to write outputdir: $outputDir")
} }
} }
...@@ -39,15 +39,14 @@ class WriteDependenciesTest extends TestNGSuite with Matchers { ...@@ -39,15 +39,14 @@ class WriteDependenciesTest extends TestNGSuite with Matchers {
} }
@Test @Test
def testDeps: Unit = { def testDeps(): Unit = {
val tempDir = Files.createTempDir() val tempDir = Files.createTempDir()
tempDir.deleteOnExit() tempDir.deleteOnExit()
val prefix = "test" val outputFile = new File(tempDir, s"deps.json")
val outputFile = new File(tempDir, s"$prefix.deps.json")
outputFile.deleteOnExit() outputFile.deleteOnExit()
val func1 = Qfunc(file1 :: Nil, file2 :: Nil) val func1 = Qfunc(file1 :: Nil, file2 :: Nil)
val func2 = Qfunc(file2 :: Nil, file3 :: Nil) val func2 = Qfunc(file2 :: Nil, file3 :: Nil)
WriteDependencies.writeDependencies(func1 :: func2 :: Nil, tempDir, prefix) WriteDependencies.writeDependencies(func1 :: func2 :: Nil, tempDir)
val deps = ConfigUtils.fileToConfigMap(outputFile) val deps = ConfigUtils.fileToConfigMap(outputFile)
deps("jobs") shouldBe a[Map[_, _]] deps("jobs") shouldBe a[Map[_, _]]
val jobs = deps("jobs").asInstanceOf[Map[String, Map[String, Any]]] val jobs = deps("jobs").asInstanceOf[Map[String, Map[String, Any]]]
...@@ -55,7 +54,7 @@ class WriteDependenciesTest extends TestNGSuite with Matchers { ...@@ -55,7 +54,7 @@ class WriteDependenciesTest extends TestNGSuite with Matchers {
deps("files") shouldBe a[List[_]] deps("files") shouldBe a[List[_]]
val files = deps("files").asInstanceOf[List[Map[String, Any]]] val files = deps("files").asInstanceOf[List[Map[String, Any]]]
val paths = files.map(x => x.get("path")).flatten val paths = files.flatMap(x => x.get("path"))
assert(paths.contains(file1.toString)) assert(paths.contains(file1.toString))
assert(paths.contains(file2.toString)) assert(paths.contains(file2.toString))
assert(paths.contains(file3.toString)) assert(paths.contains(file3.toString))
......
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