Commit 311c28ef authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Merge branch 'fix-gvcfs-extract' into 'develop'

Fix gvcfs extract



See merge request !389
parents f963bb6e d03ff5ff
......@@ -106,16 +106,12 @@ class GenotypeGVCFs(val root: Configurable) extends CommandLineGATK with Scatter
@Gather(enabled = false)
private var outputIndex: File = _
@Output
@Gather(enabled = false)
private var dbsnpIndex: File = _
override def beforeGraph() {
super.beforeGraph()
deps ++= variant.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig))
if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out))
outputIndex = VcfUtils.getVcfIndexFile(out)
dbsnp.foreach(x => dbsnpIndex = VcfUtils.getVcfIndexFile(x))
dbsnp.foreach(x => deps :+= VcfUtils.getVcfIndexFile(x))
}
override def cmdLine = super.cmdLine +
......
......@@ -73,7 +73,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(", "))
......
......@@ -13,14 +13,21 @@ class HaplotypeCallerGvcf(val root: Configurable) extends Variantcaller {
val name = "haplotypecaller_gvcf"
protected def defaultPrio = 5
/**
* Map of sample name -> gvcf. May be empty.
*/
protected var gVcfFiles: Map[String, File] = Map()
def getGvcfs = gVcfFiles
def biopetScript() {
val gvcfFiles = for ((sample, inputBam) <- inputBams) yield {
val hc = gatk.HaplotypeCaller.gvcf(this, inputBam, new File(outputDir, sample + ".gvcf.vcf.gz"))
add(hc)
hc.out
sample -> hc.out
}
val genotypeGVCFs = gatk.GenotypeGVCFs(this, gvcfFiles.toList, outputFile)
val genotypeGVCFs = gatk.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