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