Skip to content
Snippets Groups Projects
Commit dd163178 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Let SortVcf also use Reference trait

parent 2af46d82
No related branches found
No related tags found
No related merge requests found
......@@ -17,11 +17,12 @@ package nl.lumc.sasc.biopet.extensions.picard
import java.io.File
import nl.lumc.sasc.biopet.core.Reference
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{Input, Output}
/** Extension for picard SortVcf */
class SortVcf(val root: Configurable) extends Picard {
class SortVcf(val root: Configurable) extends Picard with Reference {
javaMainClass = new picard.vcf.SortVcf().getClass.getName
@Input(doc = "Input VCF(s) to be sorted. Multiple inputs must have the same sample names (in order)", required = true)
......@@ -33,6 +34,11 @@ class SortVcf(val root: Configurable) extends Picard {
@Input(doc = "Sequence dictionary to use", required = true)
var sequenceDictionary: File = _
override def beforeGraph(): Unit = {
super.beforeGraph()
if (sequenceDictionary == null) sequenceDictionary = referenceDict
}
/** Returns command to execute */
override def cmdLine = super.cmdLine +
(if (inputAsStdin) required("INPUT=", new File("/dev/stdin"), spaceSeparated = false)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment