diff --git a/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/extensions/CustomVarScan.scala b/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/extensions/CustomVarScan.scala
index 1ce8465cae9c75dbcbed9c85374074202ff9b393..8871f481f3075d7eef52784583ccb5aadaa5b715 100644
--- a/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/extensions/CustomVarScan.scala
+++ b/public/gentrap/src/main/scala/nl/lumc/sasc/biopet/pipelines/gentrap/extensions/CustomVarScan.scala
@@ -17,7 +17,7 @@ package nl.lumc.sasc.biopet.pipelines.gentrap.extensions
 
 import java.io.File
 
-import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
+import nl.lumc.sasc.biopet.core.{ Reference, BiopetCommandLineFunction }
 import nl.lumc.sasc.biopet.core.extensions.PythonCommandLineFunction
 import nl.lumc.sasc.biopet.utils.config.Configurable
 import nl.lumc.sasc.biopet.extensions.samtools.SamtoolsMpileup
@@ -28,16 +28,13 @@ import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
 /** Ad-hoc extension for VarScan variant calling that involves 6-command pipe */
 // FIXME: generalize piping instead of building something by hand like this!
 // Better to do everything quick and dirty here rather than something half-implemented with the objects
-class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction { wrapper =>
+class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction with Reference { wrapper =>
 
   override def configName = "customvarscan"
 
   @Input(doc = "Input BAM file", required = true)
   var input: File = null
 
-  @Input(doc = "Reference FASTA file", required = true)
-  var reference: File = config("reference")
-
   @Output(doc = "Output VCF file", required = true)
   var output: File = null
 
@@ -49,7 +46,6 @@ class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction {
     this.input = List(wrapper.input)
     override def configName = wrapper.configName
     disableBaq = true
-    reference = config("reference")
     depth = Option(1000000)
     outputMappingQuality = true
   }
@@ -92,7 +88,9 @@ class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction {
   }
 
   override def beforeGraph(): Unit = {
+    super.beforeGraph()
     require(output.toString.endsWith(".gz"), "Output must have a .gz file extension")
+    deps :+= referenceFasta()
   }
 
   def cmdLine: String = {