Commit 156dad59 authored by Peter van 't Hof's avatar Peter van 't Hof

Style fixes

parent 613788fd
......@@ -9,10 +9,9 @@ import org.testng.annotations.Test
import scala.io.Source
/**
* Created by pjvanthof on 09/05/16.
*/
* Created by pjvanthof on 09/05/16.
*/
class BamToChromSizesTest extends TestNGSuite with Matchers {
private def resourcePath(p: String): String = {
Paths.get(getClass.getResource(p).toURI).toString
......
......@@ -12,8 +12,8 @@ import org.testng.annotations.Test
import scala.io.Source
/**
* Created by pjvanthof on 09/05/16.
*/
* Created by pjvanthof on 09/05/16.
*/
class WriteDependenciesTest extends TestNGSuite with Matchers {
import WriteDependenciesTest._
......
package nl.lumc.sasc.biopet.utils
import java.io.{File, FileNotFoundException, PrintWriter}
import java.io.{ File, FileNotFoundException, PrintWriter }
import java.nio.file.Files
import org.scalatest.Matchers
......@@ -10,8 +10,8 @@ import org.testng.annotations.Test
import scala.io.Source
/**
* Created by pjvanthof on 05/05/16.
*/
* Created by pjvanthof on 05/05/16.
*/
class IoUtilsTest extends TestNGSuite with Matchers {
def createTempTestFile(file: File): Unit = {
......@@ -40,7 +40,7 @@ class IoUtilsTest extends TestNGSuite with Matchers {
val temp1 = File.createTempFile("test.", ".txt")
val tempDir = new File(Files.createTempDirectory("test").toFile, "non-exist")
tempDir.deleteOnExit()
tempDir shouldNot exist
tempDir shouldNot exist
val temp2 = new File(tempDir, "test.txt")
createTempTestFile(temp1)
intercept[FileNotFoundException] {
......@@ -65,12 +65,12 @@ class IoUtilsTest extends TestNGSuite with Matchers {
"dir1" + File.separator + "test2.txt",
"dir2" + File.separator + "test1.txt",
"dir2" + File.separator + "test2.txt")
relativePaths.foreach{ x =>
relativePaths.foreach { x =>
createTempTestFile(new File(tempDir1, x))
new File(tempDir2, x) shouldNot exist
}
IoUtils.copyDir(tempDir1, tempDir2)
relativePaths.foreach{ x =>
relativePaths.foreach { x =>
val file = new File(tempDir2, x)
file should exist
val reader = Source.fromFile(file)
......
package nl.lumc.sasc.biopet.utils.summary
import java.io.{File, PrintWriter}
import java.io.{ File, PrintWriter }
import nl.lumc.sasc.biopet.utils.ConfigUtils
import org.scalatest.Matchers
......@@ -8,8 +8,8 @@ import org.scalatest.testng.TestNGSuite
import org.testng.annotations.Test
/**
* Created by pjvanthof on 06/05/16.
*/
* Created by pjvanthof on 06/05/16.
*/
class SummaryTest extends TestNGSuite with Matchers {
@Test
def testSamples: Unit = {
......@@ -28,15 +28,15 @@ class SummaryTest extends TestNGSuite with Matchers {
val summary = new Summary(SummaryTest.testSummaryFile)
summary.getValue("key_1") shouldBe Some("test_1")
summary.getValue("key_x") shouldBe None
summary.getValue("samples", "sample1","key_2") shouldBe Some("test_2")
summary.getValue("samples", "sample1", "libraries", "lib1","key_3") shouldBe Some("test_3")
summary.getValue("samples", "sample1", "key_2") shouldBe Some("test_2")
summary.getValue("samples", "sample1", "libraries", "lib1", "key_3") shouldBe Some("test_3")
summary.getValue(Some("sample1"), None,"key_2") shouldBe Some("test_2")
summary.getValue(Some("sample1"), None,"key_x") shouldBe None
summary.getValue(Some("sample1"), Some("lib1"),"key_3") shouldBe Some("test_3")
summary.getValue(Some("sample1"), Some("lib1"),"key_x") shouldBe None
summary.getValue(None, None,"key_1") shouldBe Some("test_1")
summary.getValue(None, None,"key_x") shouldBe None
summary.getValue(Some("sample1"), None, "key_2") shouldBe Some("test_2")
summary.getValue(Some("sample1"), None, "key_x") shouldBe None
summary.getValue(Some("sample1"), Some("lib1"), "key_3") shouldBe Some("test_3")
summary.getValue(Some("sample1"), Some("lib1"), "key_x") shouldBe None
summary.getValue(None, None, "key_1") shouldBe Some("test_1")
summary.getValue(None, None, "key_x") shouldBe None
}
@Test
......
package nl.lumc.sasc.biopet.utils.summary
import java.io.{File, PrintWriter}
import java.io.{ File, PrintWriter }
import nl.lumc.sasc.biopet.utils.ConfigUtils
import org.scalatest.Matchers
......@@ -8,8 +8,8 @@ import org.scalatest.testng.TestNGSuite
import org.testng.annotations.Test
/**
* Created by pjvanthof on 06/05/16.
*/
* Created by pjvanthof on 06/05/16.
*/
class SummaryValueTest extends TestNGSuite with Matchers {
@Test
def testConstructor: Unit = {
......
......@@ -103,14 +103,16 @@ trait ShivaTestTrait extends TestNGSuite with Matchers {
pipeline.summarySettings.get("annotation") shouldBe Some(annotation)
pipeline.summarySettings.get("sv_calling") shouldBe Some(svCalling)
pipeline.samples foreach { case (sampleId, sample) =>
sample.summarySettings.get("single_sample_variantcalling") shouldBe Some(sampleCalling)
sample.summarySettings.get("use_indel_realigner") shouldBe Some(realign)
sample.libraries.foreach { case (libId, lib) =>
lib.summarySettings.get("library_variantcalling") shouldBe Some(libraryCalling)
lib.summarySettings.get("use_indel_realigner") shouldBe Some(realign)
lib.summarySettings.get("use_base_recalibration") shouldBe Some(baseRecalibration && dbsnp)
}
pipeline.samples foreach {
case (sampleId, sample) =>
sample.summarySettings.get("single_sample_variantcalling") shouldBe Some(sampleCalling)
sample.summarySettings.get("use_indel_realigner") shouldBe Some(realign)
sample.libraries.foreach {
case (libId, lib) =>
lib.summarySettings.get("library_variantcalling") shouldBe Some(libraryCalling)
lib.summarySettings.get("use_indel_realigner") shouldBe Some(realign)
lib.summarySettings.get("use_base_recalibration") shouldBe Some(baseRecalibration && dbsnp)
}
}
pipeline.functions.count(_.isInstanceOf[VcfStats]) shouldBe (
......
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