diff --git a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/GenotypeGVCFs.scala b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/GenotypeGVCFs.scala index 650340d63c1be0ba9195609a616ddddb4abee8ef..b36bc298843b7674c5967623abfc200563de4d18 100644 --- a/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/GenotypeGVCFs.scala +++ b/biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/gatk/GenotypeGVCFs.scala @@ -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 + diff --git a/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcalling.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcalling.scala index c38cb8564ddb0f9243443bab60f6cb41ceec5b53..4f84d061198ee9449811cd414c72e661ee1e501b 100644 --- a/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcalling.scala +++ b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcalling.scala @@ -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(", ")) diff --git a/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaplotypeCallerGvcf.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaplotypeCallerGvcf.scala index 2f7b8446b4c0a64b1348edb396f43fedcaaab4d3..a08703e95dc4ce61437641df80dd3c8da1641394 100644 --- a/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaplotypeCallerGvcf.scala +++ b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/HaplotypeCallerGvcf.scala @@ -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) } } diff --git a/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Variantcaller.scala b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Variantcaller.scala index a2e13a46602dc9ea6bee2b3cfd19e2c251d8f905..c484171187fc31c27a06c7bd69d10433c9a9bb86 100644 --- a/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Variantcaller.scala +++ b/shiva/src/main/scala/nl/lumc/sasc/biopet/pipelines/shiva/variantcallers/Variantcaller.scala @@ -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() = {}