diff --git a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GatkGeneral.scala b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GatkGeneral.scala index f390fa50487d0125fdc0ba0057484c8e42ad915c..f3712fd545c4ff3eb49927290af4352f24192669 100644 --- a/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GatkGeneral.scala +++ b/protected/biopet-gatk-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/broad/GatkGeneral.scala @@ -21,5 +21,5 @@ trait GatkGeneral extends CommandLineGATK with BiopetJavaCommandLineFunction { if (config.contains("exclude_intervals")) excludeIntervals = config("exclude_intervals").asFileList reference_sequence = config("reference") if (config.contains("gatk_key")) gatk_key = config("gatk_key") - if (config.contains("pedigree")) pedigree = config("pedigree").asFileList + if (config.contains("pedigree")) pedigree = config("pedigree") } diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala index 2c9ae7e6a87b977001ff94668db1d768511b378f..eaea3ad41a20a8cf82af63d973a1a06a10ff42e2 100644 --- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala +++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/utils/ConfigUtils.scala @@ -313,6 +313,16 @@ object ConfigUtils extends Logging { any2list(any).map(_.toString) } + /** + * Convert Any to List[File] + * @param any Input Any value + * @return + */ + def any2fileList(any: Any): List[File] = { + if (any == null) return null + any2list(any).map(x => new File(x.toString)) + } + /** * Convert Any to Map[String, Any] * @param any Input Any value @@ -505,6 +515,16 @@ object ConfigUtils extends Logging { else Nil } + /** + * Convert ConfigValue to List[File] + * @param value Input ConfigValue + * @return + */ + implicit def configValue2fileList(value: ConfigValue): List[File] = { + if (requiredValue(value)) any2fileList(value.value) + else Nil + } + /** * Convert ConfigValue to Set[String] * @param value Input ConfigValue