Commit a5f383c5 authored by Peter van 't Hof's avatar Peter van 't Hof

Fixing failing tests

parent 431621b2
......@@ -14,19 +14,19 @@
*/
package nl.lumc.sasc.biopet.pipelines.carp
import java.io.{ File, FileOutputStream }
import java.io.{File, FileOutputStream}
import com.google.common.io.Files
import nl.lumc.sasc.biopet.utils.config.Config
import nl.lumc.sasc.biopet.extensions.bwa.BwaMem
import nl.lumc.sasc.biopet.extensions.macs2.Macs2CallPeak
import nl.lumc.sasc.biopet.extensions.picard.{ MergeSamFiles, SortSam }
import nl.lumc.sasc.biopet.utils.ConfigUtils
import nl.lumc.sasc.biopet.extensions.picard.{MergeSamFiles, SortSam}
import nl.lumc.sasc.biopet.utils.{ConfigUtils, Logging}
import org.apache.commons.io.FileUtils
import org.broadinstitute.gatk.queue.QSettings
import org.scalatest.Matchers
import org.scalatest.testng.TestNGSuite
import org.testng.annotations.{ AfterClass, DataProvider, Test }
import org.testng.annotations.{AfterClass, DataProvider, Test}
/**
* Test class for [[Carp]]
......@@ -72,6 +72,7 @@ class CarpTest extends TestNGSuite with Matchers {
intercept[IllegalStateException] {
initPipeline(map).script()
}
Logging.errors.clear()
} else { // When samples are correct
val carp = initPipeline(map)
carp.script()
......
......@@ -72,7 +72,7 @@ abstract class GearsTest extends TestNGSuite with Matchers {
}
if (!sample1 && !sample2) { // When no samples
intercept[IllegalArgumentException] {
intercept[IllegalStateException] {
initPipeline(map).script()
}
Logging.errors.clear()
......
......@@ -14,17 +14,17 @@
*/
package nl.lumc.sasc.biopet.pipelines.mapping
import java.io.{ File, FileOutputStream }
import java.io.{File, FileOutputStream}
import com.google.common.io.Files
import nl.lumc.sasc.biopet.extensions.kraken.Kraken
import nl.lumc.sasc.biopet.extensions.picard.{ MarkDuplicates, MergeSamFiles }
import nl.lumc.sasc.biopet.utils.ConfigUtils
import nl.lumc.sasc.biopet.extensions.picard.{MarkDuplicates, MergeSamFiles}
import nl.lumc.sasc.biopet.utils.{ConfigUtils, Logging}
import nl.lumc.sasc.biopet.utils.config.Config
import org.broadinstitute.gatk.queue.QSettings
import org.scalatest.Matchers
import org.scalatest.testng.TestNGSuite
import org.testng.annotations.{ DataProvider, Test }
import org.testng.annotations.{DataProvider, Test}
/**
* Created by pjvanthof on 15/05/16.
......@@ -72,9 +72,10 @@ trait MultisampleMappingTestTrait extends TestNGSuite with Matchers {
}
if (!sample1 && !sample2 && !sample3 && !sample4) { // When no samples
intercept[IllegalArgumentException] {
intercept[IllegalStateException] {
initPipeline(map).script()
}
Logging.errors.clear()
} else if (sample4 && !bamToFastq && !correctReadgroups) {
intercept[IllegalStateException] {
initPipeline(map).script()
......
......@@ -14,18 +14,18 @@
*/
package nl.lumc.sasc.biopet.pipelines.shiva
import java.io.{ File, FileOutputStream }
import java.io.{File, FileOutputStream}
import com.google.common.io.Files
import nl.lumc.sasc.biopet.extensions.gatk.{ BaseRecalibrator, IndelRealigner, PrintReads, RealignerTargetCreator }
import nl.lumc.sasc.biopet.extensions.gatk.{BaseRecalibrator, IndelRealigner, PrintReads, RealignerTargetCreator}
import nl.lumc.sasc.biopet.extensions.picard.MarkDuplicates
import nl.lumc.sasc.biopet.extensions.tools.VcfStats
import nl.lumc.sasc.biopet.utils.ConfigUtils
import nl.lumc.sasc.biopet.utils.{ConfigUtils, Logging}
import nl.lumc.sasc.biopet.utils.config.Config
import org.broadinstitute.gatk.queue.QSettings
import org.scalatest.Matchers
import org.scalatest.testng.TestNGSuite
import org.testng.annotations.{ DataProvider, Test }
import org.testng.annotations.{DataProvider, Test}
/**
* Class for testing shiva
......@@ -86,6 +86,7 @@ trait ShivaTestTrait extends TestNGSuite with Matchers {
intercept[IllegalArgumentException] {
initPipeline(map).script()
}
Logging.errors.clear()
} else {
val pipeline = initPipeline(map)
pipeline.script()
......
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