Commit 693e61b8 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Fixe namespaces

parent a1f807a5
......@@ -13,7 +13,7 @@ import java.io.FileInputStream
import java.security.MessageDigest
trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurable {
analysisName = getClass.getSimpleName
analysisName = configName
@Input(doc = "deps", required = false)
var deps: List[File] = Nil
......@@ -38,7 +38,7 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
override def freezeFieldValues() {
checkExecutable
afterGraph
jobOutputFile = new File(firstOutput.getParent + "/." + firstOutput.getName + "." + analysisName + ".out")
jobOutputFile = new File(firstOutput.getParent + "/." + firstOutput.getName + "." + configName + ".out")
if (threads == 0) threads = getThreads(defaultThreads)
if (threads > 1) nCoresRequest = Option(threads)
......@@ -48,7 +48,7 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
if (vmem == null && !defaultVmem.isEmpty) vmem = defaultVmem
}
if (vmem != null) jobResourceRequests :+= "h_vmem=" + vmem
jobName = this.analysisName + ":" + firstOutput.getName
jobName = configName + ":" + firstOutput.getName
super.freezeFieldValues()
}
......
......@@ -6,9 +6,9 @@ import org.broadinstitute.gatk.queue.util.Logging
trait Configurable extends Logging {
val root: Configurable
val globalConfig: Config = if (root != null) root.globalConfig else new Config()
val configPath: List[String] = if (root != null) root.configFullPath else List()
protected val configName = getClass.getSimpleName.toLowerCase
protected val configFullPath = configName :: configPath
def configPath: List[String] = if (root != null) root.configFullPath else List()
protected lazy val configName = getClass.getSimpleName.toLowerCase
protected lazy val configFullPath = configName :: configPath
var defaults: scala.collection.mutable.Map[String,Any] = if (root != null) scala.collection.mutable.Map(root.defaults.toArray:_*)
else scala.collection.mutable.Map()
......
......@@ -18,8 +18,8 @@ class VariantRecalibrator(val root: Configurable) extends org.broadinstitute.gat
object VariantRecalibrator {
def apply(root: Configurable, input:File, recal_file:File, tranches_file:File, indel: Boolean = false): VariantRecalibrator = {
val vr = new VariantRecalibrator(root) {
override val configName = "variantrecalibrator"
override val configFullPath = (if (indel) "indel" else "snp") :: configName :: configPath
override lazy val configName = "variantrecalibrator"
override def configPath: List[String] = (if (indel) "indel" else "snp") :: super.configPath
if (indel) {
mode = org.broadinstitute.gatk.tools.walkers.variantrecalibration.VariantRecalibratorArgumentCollection.Mode.INDEL
defaults ++= Map("ts_filter_level" -> 99.0)
......
......@@ -92,18 +92,22 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
val allBamfiles = for ((sampleID,sampleOutput) <- samplesOutput;
file <- sampleOutput.variantcalling.bamFiles) yield file
val allRawVcfFiles = for ((sampleID,sampleOutput) <- samplesOutput) yield sampleOutput.variantcalling.rawFilterVcfFile
val hcDiscorvery = new HaplotypeCaller(this)
val hcDiscorvery = new HaplotypeCaller(this) {
override protected lazy val configName = "haplotypecaller"
override def configPath: List[String] = "multisample" :: super.configPath
}
hcDiscorvery.input_file = allBamfiles.toSeq
hcDiscorvery.scatterCount = config("scattercount", submodule = "multisample")
hcDiscorvery.out = outputDir + "variantcalling/hc.vcf.gz"
add(hcDiscorvery)
val cvRaw = CombineVariants(this, allRawVcfFiles.toList, outputDir + "variantcalling/raw.vcf.gz")
add(cvRaw)
val hcRaw = new HaplotypeCaller(this)
val hcRaw = new HaplotypeCaller(this) {
override protected lazy val configName = "haplotypecaller"
override def configPath: List[String] = "multisample" :: super.configPath
}
hcRaw.input_file = allBamfiles.toSeq
hcRaw.scatterCount = config("scattercount", submodule = "multisample")
hcRaw.out = outputDir + "variantcalling/raw_genotype.vcf.gz"
hcRaw.alleles = cvRaw.out
hcRaw.genotyping_mode = org.broadinstitute.gatk.tools.walkers.genotyper.GenotypingOutputMode.GENOTYPE_GIVEN_ALLELES
......
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