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

Fixing unit tests

parent 5760560d
......@@ -416,7 +416,8 @@ object ConfigUtils extends Logging {
Logging.addError(
"Value does not exist but is required, key: " + value.requestIndex.key +
" namespace: " + value.requestIndex.module,
if (value.requestIndex.path != Nil) Some(" path: " + value.requestIndex.path.mkString("->"))
if (value.requestIndex.path != Nil)
Some(" path: " + value.requestIndex.path.mkString("->"))
else None
)
exist
......
......@@ -73,10 +73,11 @@ class ShivaVariantcalling(val parent: Configurable)
//TODO: this needs changed when the sample/library refactoring is beeing done
if (Option(genders).isEmpty) genders = {
inputBams.keys.map { sampleName =>
val gender: String = config("gender", path = "samples" :: sampleName :: "tags" :: Nil)
val gender: Option[String] =
config("gender", path = "samples" :: sampleName :: "tags" :: Nil)
sampleName -> (gender match {
case "male" => Gender.Male
case "female" => Gender.Female
case Some("male") => Gender.Male
case Some("female") => Gender.Female
case _ => Gender.Unknown
})
}.toMap
......@@ -86,7 +87,7 @@ class ShivaVariantcalling(val parent: Configurable)
if (Option(tumorSamples).isEmpty)
tumorSamples = inputBams.keys
.filter(name =>
config("type", path = "samples" :: name :: "tags" :: Nil).asString.toLowerCase == "tumor")
config("type", path = "samples" :: name :: "tags" :: Nil, default = "normal").asString.toLowerCase == "tumor")
.map { tumorSample =>
val normal: String = config("normal", path = "samples" :: tumorSample :: "tags" :: Nil)
if (!inputBams.keySet.contains(normal))
......
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