Commit 34024cc5 authored by Sander van der Zeeuw's avatar Sander van der Zeeuw
Browse files

add bcf merge to shiva and create wrapper

parent f1599432
......@@ -34,13 +34,13 @@ class BcftoolsCall(val root: Configurable) extends Bcftools {
var m: Boolean = config("m", default = false)
var r: Option[String] = config("r")
@Input(required = false)
var R: Option[String] = config("R")
var R: Option[File] = config("R")
var s: Option[String] = config("s")
@Input(required = false)
var S: Option[File] = config("S")
var t: Option[String] = config("t")
@Input(required = false)
var T: Option[String] = config("T")
var T: Option[File] = config("T")
var A: Boolean = config("A", default = false)
var f: List[String] = config("f", default = Nil)
var g: Option[Int] = config("g")
......
package nl.lumc.sasc.biopet.extensions.bcftools
import java.io.File
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Output, Input }
/**
* Created by sajvanderzeeuw on 16-10-15.
*/
class BcftoolsMerge(val root: Configurable) extends Bcftools {
@Input(doc = "Input File", required = true)
var input: List[File] = Nil
@Output(doc = "output File", required = false)
var output: File = _
@Input(required = false)
var R: Option[File] = config("R")
@Input(required = false)
var useheader: Option[File] = config("useheader")
@Input(required = false)
var l: Option[File] = config("l")
var forcesamples: Boolean = config("forcesamples", default = false)
var printheader: Boolean = config("printheader", default = false)
var f: List[String] = config("f", default = Nil)
var i: List[String] = config("i", default = Nil)
var m: Option[String] = config("m")
var O: Option[String] = config("O")
var r: List[String] = config("r", default = Nil)
def cmdLine = required(executable) +
required("merge") +
(if (outputAsStsout) "" else required("-o", output)) +
conditional(forcesamples, "--force-samples") +
conditional(printheader, "--print-header") +
optional("--use-header", useheader) +
optional("-f", f) +
optional("-i", i) +
optional("-l", l) +
optional("-m", m) +
optional("-O", O) +
optional("-r", r) +
optional("-R", R) +
repeat(input)
}
......@@ -19,7 +19,7 @@ import java.io.File
import nl.lumc.sasc.biopet.core.summary.SummaryQScript
import nl.lumc.sasc.biopet.core.{ Reference, SampleLibraryTag }
import nl.lumc.sasc.biopet.extensions.bcftools.BcftoolsCall
import nl.lumc.sasc.biopet.extensions.bcftools.{ BcftoolsMerge, BcftoolsCall }
import nl.lumc.sasc.biopet.extensions.gatk.CombineVariants
import nl.lumc.sasc.biopet.extensions.samtools.SamtoolsMpileup
import nl.lumc.sasc.biopet.extensions.tools.{ MpileupToVcf, VcfFilter, VcfStats }
......@@ -201,11 +201,12 @@ trait ShivaVariantcallingTrait extends SummaryQScript with SampleLibraryTag with
bt.output
}
val cv = new CombineVariants(qscript)
cv.inputFiles = sampleVcfs
cv.outputFile = outputFile
cv.setKey = "null"
add(cv)
val bcfmerge = new BcftoolsMerge(qscript)
bcfmerge.input = sampleVcfs
bcfmerge.output = outputFile
bcfmerge.O = Some("z")
add(bcfmerge)
add(Tabix(qscript, outputFile))
}
}
......
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