Commit 8054aa2d authored by Peter van 't Hof's avatar Peter van 't Hof

Switch to beforeGraph

parent e274f59e
......@@ -82,8 +82,8 @@ class ApplyRecalibration(val root: Configurable) extends CommandLineGATK with Sc
@Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "")
var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false)
override def freezeFieldValues() {
super.freezeFieldValues()
override def beforeGraph() {
super.beforeGraph()
deps ++= input.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig))
if (recal_file != null)
deps :+= VcfUtils.getVcfIndexFile(recal_file)
......
......@@ -59,8 +59,8 @@ class CombineGVCFs(val root: Configurable) extends CommandLineGATK with ScatterG
@Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "")
var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false)
override def freezeFieldValues() {
super.freezeFieldValues()
override def beforeGraph() {
super.beforeGraph()
dbsnp.foreach(deps :+= VcfUtils.getVcfIndexFile(_))
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))
......
......@@ -91,8 +91,8 @@ class CombineVariants(val root: Configurable) extends CommandLineGATK with Scatt
@Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "")
var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false)
override def freezeFieldValues() {
super.freezeFieldValues()
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))
if (!org.broadinstitute.gatk.utils.commandline.ArgumentTypeDescriptor.isCompressed(out.getPath))
......
......@@ -131,8 +131,8 @@ class IndelRealigner(val root: Configurable) extends CommandLineGATK with Scatte
@Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "")
var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false)
override def freezeFieldValues() {
super.freezeFieldValues()
override def beforeGraph() {
super.beforeGraph()
deps ++= knownAlleles.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig))
if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out))
if (!disable_bam_indexing)
......
......@@ -62,8 +62,8 @@ class PrintReads(val root: Configurable) extends CommandLineGATK with ScatterGat
@Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "")
var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false)
override def freezeFieldValues() {
super.freezeFieldValues()
override def beforeGraph() {
super.beforeGraph()
if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out))
if (!disable_bam_indexing)
outputFiles :+= new File(out.getPath.stripSuffix(".bam") + ".bai")
......
......@@ -61,8 +61,8 @@ class RealignerTargetCreator(val root: Configurable) extends CommandLineGATK wit
if (config.contains("dbsnp")) known :+= new File(config("dbsnp").asString)
override def freezeFieldValues() {
super.freezeFieldValues()
override def beforeGraph() {
super.beforeGraph()
deps ++= known.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig))
}
......
......@@ -207,8 +207,8 @@ class SelectVariants(val root: Configurable) extends CommandLineGATK with Scatte
@Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "")
var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false)
override def freezeFieldValues() {
super.freezeFieldValues()
override def beforeGraph() {
super.beforeGraph()
if (variant != null)
deps :+= VcfUtils.getVcfIndexFile(variant)
discordance.foreach(deps :+= VcfUtils.getVcfIndexFile(_))
......
......@@ -251,8 +251,8 @@ class UnifiedGenotyper(val root: Configurable) extends CommandLineGATK with Scat
@Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "")
var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false)
override def freezeFieldValues() {
super.freezeFieldValues()
override def beforeGraph() {
super.beforeGraph()
reference_sample_calls.foreach(deps :+= VcfUtils.getVcfIndexFile(_))
alleles.foreach(deps :+= VcfUtils.getVcfIndexFile(_))
dbsnp.foreach(deps :+= VcfUtils.getVcfIndexFile(_))
......
......@@ -8,36 +8,6 @@ package nl.lumc.sasc.biopet.extensions.gatk.broad
import nl.lumc.sasc.biopet.utils.VcfUtils
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile
import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Input, Output }
//class VariantEval(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.VariantEval with GatkGeneral {
//}
//
//object VariantEval {
// def apply(root: Configurable, sample: File, compareWith: File,
// output: File): VariantEval = {
// val vareval = new VariantEval(root)
// vareval.eval = Seq(sample)
// vareval.comp = Seq(compareWith)
// vareval.out = output
// vareval
// }
//
// def apply(root: Configurable, sample: File, compareWith: File,
// output: File, ST: Seq[String], EV: Seq[String]): VariantEval = {
// val vareval = new VariantEval(root)
// vareval.eval = Seq(sample)
// vareval.comp = Seq(compareWith)
// vareval.out = output
// vareval.noST = true
// vareval.ST = ST
// vareval.noEV = true
// vareval.EV = EV
// vareval
// }
//
//}
import java.io.File
import org.broadinstitute.gatk.utils.commandline.Argument
import org.broadinstitute.gatk.utils.commandline.Gather
......@@ -160,8 +130,8 @@ class VariantEval(val root: Configurable) extends CommandLineGATK {
@Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "")
var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false)
override def freezeFieldValues() {
super.freezeFieldValues()
override def beforeGraph() {
super.beforeGraph()
deps ++= eval.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig))
deps ++= comp.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig))
dbsnp.foreach(deps :+= VcfUtils.getVcfIndexFile(_))
......
......@@ -170,8 +170,8 @@ class VariantRecalibrator(val root: Configurable) extends CommandLineGATK {
@Argument(fullName = "filter_bases_not_stored", shortName = "filterNoBases", doc = "Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error", required = false, exclusiveOf = "", validation = "")
var filter_bases_not_stored: Boolean = config("filter_bases_not_stored", default = false)
override def freezeFieldValues() {
super.freezeFieldValues()
override def beforeGraph() {
super.beforeGraph()
deps ++= input.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig))
deps ++= aggregate.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig))
deps ++= resource.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig))
......
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