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

Fixed vep config

parent de951794
...@@ -17,9 +17,9 @@ package nl.lumc.sasc.biopet.core ...@@ -17,9 +17,9 @@ package nl.lumc.sasc.biopet.core
import java.io.File import java.io.File
import htsjdk.samtools.reference.IndexedFastaSequenceFile import htsjdk.samtools.reference.IndexedFastaSequenceFile
import nl.lumc.sasc.biopet.core.summary.{ SummaryQScript, Summarizable } import nl.lumc.sasc.biopet.core.summary.{Summarizable, SummaryQScript}
import nl.lumc.sasc.biopet.utils.{ ConfigUtils, Logging } import nl.lumc.sasc.biopet.utils.{ConfigUtils, LazyCheck, Logging}
import nl.lumc.sasc.biopet.utils.config.{ Config, Configurable } import nl.lumc.sasc.biopet.utils.config.{Config, Configurable}
import scala.collection.JavaConversions._ import scala.collection.JavaConversions._
...@@ -59,7 +59,6 @@ trait Reference extends Configurable { ...@@ -59,7 +59,6 @@ trait Reference extends Configurable {
lazy val dbsnpVersion: Option[Int] = config("dbsnp_version") lazy val dbsnpVersion: Option[Int] = config("dbsnp_version")
lazy val dbsnpSubPath: List[String] = dbsnpVersion.map(x => List("dbsnp_annotations", x.toString)).getOrElse(Nil) lazy val dbsnpSubPath: List[String] = dbsnpVersion.map(x => List("dbsnp_annotations", x.toString)).getOrElse(Nil)
def dbsnpVcfFile: Option[File] = config("dbsnp_vcf", extraSubPath = dbsnpSubPath) def dbsnpVcfFile: Option[File] = config("dbsnp_vcf", extraSubPath = dbsnpSubPath)
lazy val vepConfig: Option[String] = config("vep_config")
/** Returns the reference config path */ /** Returns the reference config path */
def referenceConfigPath = { def referenceConfigPath = {
......
...@@ -17,10 +17,10 @@ package nl.lumc.sasc.biopet.extensions ...@@ -17,10 +17,10 @@ package nl.lumc.sasc.biopet.extensions
import java.io.File import java.io.File
import nl.lumc.sasc.biopet.core.summary.Summarizable import nl.lumc.sasc.biopet.core.summary.Summarizable
import nl.lumc.sasc.biopet.utils.{ Logging, VcfUtils, tryToParseNumber } import nl.lumc.sasc.biopet.utils.{LazyCheck, Logging, VcfUtils, tryToParseNumber}
import nl.lumc.sasc.biopet.utils.config.Configurable import nl.lumc.sasc.biopet.utils.config.Configurable
import nl.lumc.sasc.biopet.core.{ BiopetCommandLineFunction, Reference, Version } import nl.lumc.sasc.biopet.core.{BiopetCommandLineFunction, Reference, Version}
import org.broadinstitute.gatk.utils.commandline.{ Input, Output } import org.broadinstitute.gatk.utils.commandline.{Input, Output}
import scala.io.Source import scala.io.Source
...@@ -39,7 +39,15 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu ...@@ -39,7 +39,15 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu
@Output(doc = "output file", required = true) @Output(doc = "output file", required = true)
var output: File = null var output: File = null
override def subPath = super.subPath ++ vepConfig lazy val vepConfig = new LazyCheck({
val s: Option[String] = config("vep_config")
s
})
override def subPath = {
if (vepConfig.isSet) super.subPath ++ vepConfig()
else super.subPath
}
def versionRegex = """version (\d*)""".r def versionRegex = """version (\d*)""".r
def versionCommand = executable + " " + vepScript + " --help" def versionCommand = executable + " " + vepScript + " --help"
......
Supports Markdown
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