Commit 217e8ee4 authored by Peter van 't Hof's avatar Peter van 't Hof

Fixed indexes

parent ba03a58f
......@@ -8,8 +8,9 @@ package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.extensions.gatk.{ CatVariantsGatherer, GATKScatterFunction, LocusScatterFunction, TaggedFile }
import org.broadinstitute.gatk.queue.extensions.gatk.{CatVariantsGatherer, GATKScatterFunction, LocusScatterFunction, TaggedFile}
import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import nl.lumc.sasc.biopet.utils.VcfUtils
import org.broadinstitute.gatk.utils.commandline.Argument
import org.broadinstitute.gatk.utils.commandline.Gather
import org.broadinstitute.gatk.utils.commandline.Input
......@@ -37,11 +38,6 @@ class ApplyRecalibration(val root: Configurable) extends CommandLineGATK with Sc
@Gather(classOf[CatVariantsGatherer])
var out: File = _
/** Automatically generated index for out */
@Output(fullName = "outIndex", shortName = "", doc = "Automatically generated index for out", required = false, exclusiveOf = "", validation = "")
@Gather(enabled = false)
private var outIndex: File = _
/** The truth sensitivity level at which to start filtering */
@Argument(fullName = "ts_filter_level", shortName = "ts_filter_level", doc = "The truth sensitivity level at which to start filtering", required = false, exclusiveOf = "", validation = "")
var ts_filter_level: Option[Double] = config("ts_filter_level")
......@@ -88,12 +84,12 @@ class ApplyRecalibration(val root: Configurable) extends CommandLineGATK with Sc
override def freezeFieldValues() {
super.freezeFieldValues()
deps ++= input.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => new File(orig.getPath + ".idx"))
deps ++= input.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig))
if (recal_file != null)
deps :+= new File(recal_file.getPath + ".idx")
deps :+= VcfUtils.getVcfIndexFile(recal_file)
if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out))
if (!org.broadinstitute.gatk.utils.commandline.ArgumentTypeDescriptor.isCompressed(out.getPath))
outIndex = new File(out.getPath + ".idx")
outputFiles :+= VcfUtils.getVcfIndexFile(out)
num_threads = Option(getThreads)
}
......
......@@ -8,9 +8,10 @@ package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.extensions.gatk.{ GATKScatterFunction, ReadScatterFunction, TaggedFile }
import org.broadinstitute.gatk.queue.extensions.gatk.{GATKScatterFunction, ReadScatterFunction, TaggedFile}
import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ }
import nl.lumc.sasc.biopet.utils.VcfUtils
import org.broadinstitute.gatk.utils.commandline.{Argument, Gather, Output, _}
//TODO: check gathering
class BaseRecalibrator(val root: Configurable) extends CommandLineGATK /* with ScatterGatherableFunction */ {
......@@ -145,7 +146,7 @@ class BaseRecalibrator(val root: Configurable) extends CommandLineGATK /* with S
override def beforeGraph() {
super.beforeGraph()
knownSitesIndexes ++= knownSites.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => new File(orig.getPath + ".idx"))
knownSitesIndexes ++= knownSites.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig))
}
override def cmdLine = super.cmdLine +
......
......@@ -61,7 +61,7 @@ class CombineGVCFs(val root: Configurable) extends CommandLineGATK with ScatterG
override def freezeFieldValues() {
super.freezeFieldValues()
dbsnp.foreach(x => deps :+= VcfUtils.getVcfIndexFile(x))
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))
if (!org.broadinstitute.gatk.utils.commandline.ArgumentTypeDescriptor.isCompressed(out.getPath))
......
......@@ -402,7 +402,7 @@ class HaplotypeCaller(val root: Configurable) extends CommandLineGATK with Scatt
if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out))
if (!org.broadinstitute.gatk.utils.commandline.ArgumentTypeDescriptor.isCompressed(out.getPath))
outputFiles :+= VcfUtils.getVcfIndexFile(out)
dbsnp.foreach(x => VcfUtils.getVcfIndexFile(x))
dbsnp.foreach(deps :+= VcfUtils.getVcfIndexFile(_))
deps ++= comp.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => new File(orig.getPath + ".idx"))
if (bamOutput != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(bamOutput))
if (!disable_bam_indexing)
......
......@@ -8,9 +8,10 @@ package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.extensions.gatk.{ GATKScatterFunction, LocusScatterFunction, TaggedFile }
import org.broadinstitute.gatk.queue.extensions.gatk.{GATKScatterFunction, LocusScatterFunction, TaggedFile}
import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Input, _ }
import nl.lumc.sasc.biopet.utils.VcfUtils
import org.broadinstitute.gatk.utils.commandline.{Argument, Gather, Input, _}
class RealignerTargetCreator(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction {
def analysis_type = "RealignerTargetCreator"
......@@ -24,19 +25,15 @@ class RealignerTargetCreator(val root: Configurable) extends CommandLineGATK wit
/** Input VCF file with known indels */
@Input(fullName = "known", shortName = "known", doc = "Input VCF file with known indels", required = false, exclusiveOf = "", validation = "")
var known: Seq[File] = Nil
/** Dependencies on any indexes of known */
@Input(fullName = "knownIndexes", shortName = "", doc = "Dependencies on any indexes of known", required = false, exclusiveOf = "", validation = "")
private var knownIndexes: Seq[File] = Nil
var known: List[File] = config("known", default = Nil)
/** window size for calculating entropy or SNP clusters */
@Argument(fullName = "windowSize", shortName = "window", doc = "window size for calculating entropy or SNP clusters", required = false, exclusiveOf = "", validation = "")
var windowSize: Option[Int] = None
var windowSize: Option[Int] = config("windowSize")
/** fraction of base qualities needing to mismatch for a position to have high entropy */
@Argument(fullName = "mismatchFraction", shortName = "mismatch", doc = "fraction of base qualities needing to mismatch for a position to have high entropy", required = false, exclusiveOf = "", validation = "")
var mismatchFraction: Option[Double] = None
var mismatchFraction: Option[Double] = config("mismatchFraction")
/** Format string for mismatchFraction */
@Argument(fullName = "mismatchFractionFormat", shortName = "", doc = "Format string for mismatchFraction", required = false, exclusiveOf = "", validation = "")
......@@ -44,27 +41,29 @@ class RealignerTargetCreator(val root: Configurable) extends CommandLineGATK wit
/** minimum reads at a locus to enable using the entropy calculation */
@Argument(fullName = "minReadsAtLocus", shortName = "minReads", doc = "minimum reads at a locus to enable using the entropy calculation", required = false, exclusiveOf = "", validation = "")
var minReadsAtLocus: Option[Int] = None
var minReadsAtLocus: Option[Int] = config("minReadsAtLocus")
/** maximum interval size; any intervals larger than this value will be dropped */
@Argument(fullName = "maxIntervalSize", shortName = "maxInterval", doc = "maximum interval size; any intervals larger than this value will be dropped", required = false, exclusiveOf = "", validation = "")
var maxIntervalSize: Option[Int] = None
var maxIntervalSize: Option[Int] = config("maxIntervalSize")
/** Filter out reads with CIGAR containing the N operator, instead of failing with an error */
@Argument(fullName = "filter_reads_with_N_cigar", shortName = "filterRNC", doc = "Filter out reads with CIGAR containing the N operator, instead of failing with an error", required = false, exclusiveOf = "", validation = "")
var filter_reads_with_N_cigar: Boolean = _
var filter_reads_with_N_cigar: Boolean = config("filter_reads_with_N_cigar", default = false)
/** Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error */
@Argument(fullName = "filter_mismatching_base_and_quals", shortName = "filterMBQ", doc = "Filter out reads with mismatching numbers of bases and base qualities, instead of failing with an error", required = false, exclusiveOf = "", validation = "")
var filter_mismatching_base_and_quals: Boolean = _
var filter_mismatching_base_and_quals: Boolean = config("filter_mismatching_base_and_quals", default = false)
/** Filter out reads with no stored bases (i.e. '*' where the sequence should be), instead of failing with an error */
@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 = _
var filter_bases_not_stored: Boolean = config("", default = false)
if (config.contains("dbsnp")) known :+= new File(config("dbsnp").asString)
override def freezeFieldValues() {
super.freezeFieldValues()
knownIndexes ++= known.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => new File(orig.getPath + ".idx"))
deps ++= known.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => VcfUtils.getVcfIndexFile(orig))
}
override def cmdLine = super.cmdLine +
......
......@@ -48,9 +48,10 @@ package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.extensions.gatk.{ CatVariantsGatherer, GATKScatterFunction, LocusScatterFunction, TaggedFile }
import org.broadinstitute.gatk.queue.extensions.gatk.{CatVariantsGatherer, GATKScatterFunction, LocusScatterFunction, TaggedFile}
import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import org.broadinstitute.gatk.utils.commandline.{ Gather, Input, Output, _ }
import nl.lumc.sasc.biopet.utils.VcfUtils
import org.broadinstitute.gatk.utils.commandline.{Gather, Input, Output, _}
class UnifiedGenotyper(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction {
def analysis_type = "UnifiedGenotyper"
......@@ -131,11 +132,7 @@ class UnifiedGenotyper(val root: Configurable) extends CommandLineGATK with Scat
/** VCF file with the truth callset for the reference sample */
@Input(fullName = "reference_sample_calls", shortName = "referenceCalls", doc = "VCF file with the truth callset for the reference sample", required = false, exclusiveOf = "", validation = "")
var reference_sample_calls: File = _
/** Dependencies on the index of reference_sample_calls */
@Input(fullName = "reference_sample_callsIndex", shortName = "", doc = "Dependencies on the index of reference_sample_calls", required = false, exclusiveOf = "", validation = "")
private var reference_sample_callsIndex: Seq[File] = Nil
var reference_sample_calls: Option[File] = None
/** Reference sample name. */
@Argument(fullName = "reference_sample_name", shortName = "refsample", doc = "Reference sample name.", required = false, exclusiveOf = "", validation = "")
......@@ -215,11 +212,7 @@ class UnifiedGenotyper(val root: Configurable) extends CommandLineGATK with Scat
/** The set of alleles at which to genotype when --genotyping_mode is GENOTYPE_GIVEN_ALLELES */
@Input(fullName = "alleles", shortName = "alleles", doc = "The set of alleles at which to genotype when --genotyping_mode is GENOTYPE_GIVEN_ALLELES", required = false, exclusiveOf = "", validation = "")
var alleles: File = _
/** Dependencies on the index of alleles */
@Input(fullName = "allelesIndex", shortName = "", doc = "Dependencies on the index of alleles", required = false, exclusiveOf = "", validation = "")
private var allelesIndex: Seq[File] = Nil
var alleles: Option[File] = _
/** Fraction of contamination in sequencing data (for all samples) to aggressively remove */
@Argument(fullName = "contamination_fraction_to_filter", shortName = "contamination", doc = "Fraction of contamination in sequencing data (for all samples) to aggressively remove", required = false, exclusiveOf = "", validation = "")
......@@ -251,30 +244,17 @@ class UnifiedGenotyper(val root: Configurable) extends CommandLineGATK with Scat
/** dbSNP file */
@Input(fullName = "dbsnp", shortName = "D", doc = "dbSNP file", required = false, exclusiveOf = "", validation = "")
var dbsnp: File = _
/** Dependencies on the index of dbsnp */
@Input(fullName = "dbsnpIndex", shortName = "", doc = "Dependencies on the index of dbsnp", required = false, exclusiveOf = "", validation = "")
private var dbsnpIndex: Seq[File] = Nil
var dbsnp: Option[File] = None
/** Comparison VCF file */
@Input(fullName = "comp", shortName = "comp", doc = "Comparison VCF file", required = false, exclusiveOf = "", validation = "")
var comp: Seq[File] = Nil
/** Dependencies on any indexes of comp */
@Input(fullName = "compIndexes", shortName = "", doc = "Dependencies on any indexes of comp", required = false, exclusiveOf = "", validation = "")
private var compIndexes: Seq[File] = Nil
/** File to which variants should be written */
@Output(fullName = "out", shortName = "o", doc = "File to which variants should be written", required = false, exclusiveOf = "", validation = "")
@Gather(classOf[CatVariantsGatherer])
var out: File = _
/** Automatically generated index for out */
@Output(fullName = "outIndex", shortName = "", doc = "Automatically generated index for out", required = false, exclusiveOf = "", validation = "")
@Gather(enabled = false)
private var outIndex: File = _
/** If provided, only these samples will be emitted into the VCF, regardless of which samples are present in the BAM file */
@Argument(fullName = "onlyEmitSamples", shortName = "onlyEmitSamples", doc = "If provided, only these samples will be emitted into the VCF, regardless of which samples are present in the BAM file", required = false, exclusiveOf = "", validation = "")
var onlyEmitSamples: Seq[String] = Nil
......@@ -313,16 +293,13 @@ class UnifiedGenotyper(val root: Configurable) extends CommandLineGATK with Scat
override def freezeFieldValues() {
super.freezeFieldValues()
if (reference_sample_calls != null)
reference_sample_callsIndex :+= new File(reference_sample_calls.getPath + ".idx")
if (alleles != null)
allelesIndex :+= new File(alleles.getPath + ".idx")
if (dbsnp != null)
dbsnpIndex :+= new File(dbsnp.getPath + ".idx")
compIndexes ++= comp.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => new File(orig.getPath + ".idx"))
reference_sample_calls.foreach( deps :+= VcfUtils.getVcfIndexFile(_))
alleles.foreach( deps :+= VcfUtils.getVcfIndexFile(_))
dbsnp.foreach( deps :+= VcfUtils.getVcfIndexFile(_))
deps ++= comp.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))
outIndex = new File(out.getPath + ".idx")
outputFiles :+= VcfUtils.getVcfIndexFile(out)
}
override def cmdLine = super.cmdLine +
......
......@@ -5,31 +5,13 @@
*/
package nl.lumc.sasc.biopet.extensions.gatk.broad
//import java.io.File
//
//import nl.lumc.sasc.biopet.utils.config.Configurable
//
//class VariantAnnotator(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.VariantAnnotator with GatkGeneral {
// if (config.contains("scattercount")) scatterCount = config("scattercount")
// dbsnp = config("dbsnp")
//}
//
//object VariantAnnotator {
// def apply(root: Configurable, input: File, bamFiles: List[File], output: File): VariantAnnotator = {
// val va = new VariantAnnotator(root)
// va.variant = input
// va.input_file = bamFiles
// va.out = output
// va
// }
//}
import java.io.File
import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import nl.lumc.sasc.biopet.utils.VcfUtils
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.extensions.gatk.{ CatVariantsGatherer, GATKScatterFunction, LocusScatterFunction, TaggedFile }
import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ }
import org.broadinstitute.gatk.queue.extensions.gatk.{CatVariantsGatherer, GATKScatterFunction, LocusScatterFunction, TaggedFile}
import org.broadinstitute.gatk.utils.commandline.{Argument, Gather, Output, _}
class VariantAnnotator(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction {
def analysis_type = "VariantAnnotator"
......@@ -40,52 +22,27 @@ class VariantAnnotator(val root: Configurable) extends CommandLineGATK with Scat
@Input(fullName = "variant", shortName = "V", doc = "Input VCF file", required = true, exclusiveOf = "", validation = "")
var variant: File = _
/** Dependencies on the index of variant */
@Input(fullName = "variantIndex", shortName = "", doc = "Dependencies on the index of variant", required = false, exclusiveOf = "", validation = "")
private var variantIndex: Seq[File] = Nil
/** SnpEff file from which to get annotations */
@Input(fullName = "snpEffFile", shortName = "snpEffFile", doc = "SnpEff file from which to get annotations", required = false, exclusiveOf = "", validation = "")
var snpEffFile: File = _
/** Dependencies on the index of snpEffFile */
@Input(fullName = "snpEffFileIndex", shortName = "", doc = "Dependencies on the index of snpEffFile", required = false, exclusiveOf = "", validation = "")
private var snpEffFileIndex: Seq[File] = Nil
var snpEffFile: Option[File] = None
/** dbSNP file */
@Input(fullName = "dbsnp", shortName = "D", doc = "dbSNP file", required = false, exclusiveOf = "", validation = "")
var dbsnp: File = _
/** Dependencies on the index of dbsnp */
@Input(fullName = "dbsnpIndex", shortName = "", doc = "Dependencies on the index of dbsnp", required = false, exclusiveOf = "", validation = "")
private var dbsnpIndex: Seq[File] = Nil
var dbsnp: Option[File] = None
/** Comparison VCF file */
@Input(fullName = "comp", shortName = "comp", doc = "Comparison VCF file", required = false, exclusiveOf = "", validation = "")
var comp: Seq[File] = Nil
/** Dependencies on any indexes of comp */
@Input(fullName = "compIndexes", shortName = "", doc = "Dependencies on any indexes of comp", required = false, exclusiveOf = "", validation = "")
private var compIndexes: Seq[File] = Nil
/** External resource VCF file */
@Input(fullName = "resource", shortName = "resource", doc = "External resource VCF file", required = false, exclusiveOf = "", validation = "")
var resource: Seq[File] = Nil
/** Dependencies on any indexes of resource */
@Input(fullName = "resourceIndexes", shortName = "", doc = "Dependencies on any indexes of resource", required = false, exclusiveOf = "", validation = "")
private var resourceIndexes: Seq[File] = Nil
/** File to which variants should be written */
@Output(fullName = "out", shortName = "o", doc = "File to which variants should be written", required = false, exclusiveOf = "", validation = "")
@Gather(classOf[CatVariantsGatherer])
var out: File = _
/** Automatically generated index for out */
@Output(fullName = "outIndex", shortName = "", doc = "Automatically generated index for out", required = false, exclusiveOf = "", validation = "")
@Gather(enabled = false)
private var outIndex: File = _
/** One or more specific annotations to apply to variant calls */
@Argument(fullName = "annotation", shortName = "A", doc = "One or more specific annotations to apply to variant calls", required = false, exclusiveOf = "", validation = "")
var annotation: Seq[String] = Nil
......@@ -138,19 +95,17 @@ class VariantAnnotator(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 = _
override def freezeFieldValues() {
super.freezeFieldValues()
override def beforeGraph() {
super.beforeGraph()
if (variant != null)
variantIndex :+= new File(variant.getPath + ".idx")
if (snpEffFile != null)
snpEffFileIndex :+= new File(snpEffFile.getPath + ".idx")
if (dbsnp != null)
dbsnpIndex :+= new File(dbsnp.getPath + ".idx")
compIndexes ++= comp.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => new File(orig.getPath + ".idx"))
resourceIndexes ++= resource.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => new File(orig.getPath + ".idx"))
deps :+= VcfUtils.getVcfIndexFile(variant)
snpEffFile.foreach(deps :+= VcfUtils.getVcfIndexFile(_))
dbsnp.foreach(deps :+= VcfUtils.getVcfIndexFile(_))
deps ++= comp.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))
if (out != null && !org.broadinstitute.gatk.utils.io.IOUtils.isSpecialFile(out))
if (!org.broadinstitute.gatk.utils.commandline.ArgumentTypeDescriptor.isCompressed(out.getPath))
outIndex = new File(out.getPath + ".idx")
outputFiles :+= VcfUtils.getVcfIndexFile(out)
}
override def cmdLine = super.cmdLine +
......
......@@ -7,9 +7,10 @@ package nl.lumc.sasc.biopet.extensions.gatk.broad
import java.io.File
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 }
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 {
//}
......@@ -57,33 +58,17 @@ class VariantEval(val root: Configurable) extends CommandLineGATK {
@Input(fullName = "eval", shortName = "eval", doc = "Input evaluation file(s)", required = true, exclusiveOf = "", validation = "")
var eval: Seq[File] = Nil
/** Dependencies on any indexes of eval */
@Input(fullName = "evalIndexes", shortName = "", doc = "Dependencies on any indexes of eval", required = false, exclusiveOf = "", validation = "")
private var evalIndexes: Seq[File] = Nil
/** Input comparison file(s) */
@Input(fullName = "comp", shortName = "comp", doc = "Input comparison file(s)", required = false, exclusiveOf = "", validation = "")
var comp: Seq[File] = Nil
/** Dependencies on any indexes of comp */
@Input(fullName = "compIndexes", shortName = "", doc = "Dependencies on any indexes of comp", required = false, exclusiveOf = "", validation = "")
private var compIndexes: Seq[File] = Nil
/** dbSNP file */
@Input(fullName = "dbsnp", shortName = "D", doc = "dbSNP file", required = false, exclusiveOf = "", validation = "")
var dbsnp: File = _
/** Dependencies on the index of dbsnp */
@Input(fullName = "dbsnpIndex", shortName = "", doc = "Dependencies on the index of dbsnp", required = false, exclusiveOf = "", validation = "")
private var dbsnpIndex: Seq[File] = Nil
var dbsnp: Option[File] = None
/** Evaluations that count calls at sites of true variation (e.g., indel calls) will use this argument as their gold standard for comparison */
@Input(fullName = "goldStandard", shortName = "gold", doc = "Evaluations that count calls at sites of true variation (e.g., indel calls) will use this argument as their gold standard for comparison", required = false, exclusiveOf = "", validation = "")
var goldStandard: File = _
/** Dependencies on the index of goldStandard */
@Input(fullName = "goldStandardIndex", shortName = "", doc = "Dependencies on the index of goldStandard", required = false, exclusiveOf = "", validation = "")
private var goldStandardIndex: Seq[File] = Nil
var goldStandard: Option[File] = None
/** List the available eval modules and exit */
@Argument(fullName = "list", shortName = "ls", doc = "List the available eval modules and exit", required = false, exclusiveOf = "", validation = "")
......@@ -183,12 +168,10 @@ class VariantEval(val root: Configurable) extends CommandLineGATK {
override def freezeFieldValues() {
super.freezeFieldValues()
evalIndexes ++= eval.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => new File(orig.getPath + ".idx"))
compIndexes ++= comp.filter(orig => orig != null && (!orig.getName.endsWith(".list"))).map(orig => new File(orig.getPath + ".idx"))
if (dbsnp != null)
dbsnpIndex :+= new File(dbsnp.getPath + ".idx")
if (goldStandard != null)
goldStandardIndex :+= new File(goldStandard.getPath + ".idx")
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(_))
goldStandard.foreach(deps :+= VcfUtils.getVcfIndexFile(_))
}
override def cmdLine = super.cmdLine +
......
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