Commit fcc7d9bf authored by Sander Bollen's avatar Sander Bollen
Browse files

get gvcfs from shiva

parent ff0d656a
......@@ -7,8 +7,8 @@ import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
/**
* Created by pjvanthof on 30/03/16.
*/
* Created by pjvanthof on 30/03/16.
*/
class Grep(val root: Configurable) extends BiopetCommandLineFunction {
@Input(doc = "Input file", required = true)
var input: File = _
......
......@@ -72,7 +72,7 @@ class ShivaVariantcalling(val root: Configurable) extends QScript
/** Variantcallers requested by the config */
protected val configCallers: Set[String] = config("variantcallers")
protected val callers: List[Variantcaller] = {
val callers: List[Variantcaller] = {
(for (name <- configCallers) yield {
if (!callersList.exists(_.name == name))
Logging.addError(s"variantcaller '$name' does not exist, possible to use: " + callersList.map(_.name).mkString(", "))
......@@ -80,6 +80,8 @@ class ShivaVariantcalling(val root: Configurable) extends QScript
}).flatten.toList.sortBy(_.prio)
}
callers.filter(_.isInstanceOf[HaplotypeCallerGvcf])
/** This will add jobs for this pipeline */
def biopetScript(): Unit = {
require(inputBams.nonEmpty, "No input bams found")
......
......@@ -13,14 +13,21 @@ class HaplotypeCallerGvcf(val root: Configurable) extends Variantcaller {
val name = "haplotypecaller_gvcf"
protected def defaultPrio = 5
/**
*
*/
protected var gVcfFiles: Map[String, File] = Map()
def getGvcfs = gVcfFiles
def biopetScript() {
val gvcfFiles = for ((sample, inputBam) <- inputBams) yield {
gVcfFiles = for ((sample, inputBam) <- inputBams) yield {
val hc = broad.HaplotypeCaller.gvcf(this, inputBam, new File(outputDir, sample + ".gvcf.vcf.gz"))
add(hc)
hc.out
sample -> hc.out
}
val genotypeGVCFs = broad.GenotypeGVCFs(this, gvcfFiles.toList, outputFile)
val genotypeGVCFs = broad.GenotypeGVCFs(this, gVcfFiles.values.toList, outputFile)
add(genotypeGVCFs)
}
}
......@@ -28,6 +28,9 @@ trait Variantcaller extends QScript with BiopetQScript with Reference {
var namePrefix: String = _
/**
* Map of samplename -> (preprocessed) bam file
*/
var inputBams: Map[String, File] = _
def init() = {}
......
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