Commit 61695e0a authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Moved all to afterGraph function

parent 96b4f7a0
......@@ -4,13 +4,13 @@ import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
class ApplyRecalibration(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.ApplyRecalibration with GatkGeneral {
if (config.contains("scattercount")) scatterCount = config("scattercount")
nt = Option(getThreads(3))
memoryLimit = Option(nt.getOrElse(1) * 2)
override def afterGraph {
super.afterGraph
if (config.contains("scattercount")) scatterCount = config("scattercount")
nt = Option(getThreads(3))
memoryLimit = Option(nt.getOrElse(1) * 2)
ts_filter_level = config("ts_filter_level")
}
}
......
......@@ -4,8 +4,12 @@ import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
class BaseRecalibrator(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.BaseRecalibrator with GatkGeneral {
if (config.contains("scattercount")) scatterCount = config("scattercount")
if (config.contains("dbsnp")) this.knownSites +:= new File(config("dbsnp"))
override def afterGraph {
super.afterGraph
if (config.contains("scattercount")) scatterCount = config("scattercount")
if (config.contains("dbsnp")) knownSites +:= new File(config("dbsnp"))
}
}
object BaseRecalibrator {
......
......@@ -4,35 +4,35 @@ import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.utils.variant.GATKVCFIndexType
class HaplotypeCaller(val root: Configurable) extends org.broadinstitute.gatk.queue.extensions.gatk.HaplotypeCaller with GatkGeneral {
min_mapping_quality_score = config("minMappingQualityScore", default = 20)
if (config.contains("scattercount")) scatterCount = config("scattercount")
if (config.contains("dbsnp")) this.dbsnp = config("dbsnp")
nct = config("threads", default = 3)
bamOutput = config("bamOutput")
memoryLimit = Option(nct.getOrElse(1) * 2)
if (config.contains("allSitePLs")) this.allSitePLs = config("allSitePLs")
override def afterGraph {
super.afterGraph
min_mapping_quality_score = config("minMappingQualityScore", default = 20)
if (config.contains("scattercount")) scatterCount = config("scattercount")
if (config.contains("dbsnp")) this.dbsnp = config("dbsnp")
nct = config("threads", default = 3)
bamOutput = config("bamOutput")
memoryLimit = Option(nct.getOrElse(1) * 2)
if (config.contains("allSitePLs")) this.allSitePLs = config("allSitePLs")
// GVCF options
if (config("emitRefConfidence", default = "GVCF").getString == "GVCF") {
emitRefConfidence = org.broadinstitute.gatk.tools.walkers.haplotypecaller.ReferenceConfidenceMode.GVCF
variant_index_type = GATKVCFIndexType.LINEAR
variant_index_parameter = Option(128000)
}
// GVCF options
if (config("emitRefConfidence", default = "GVCF").getString == "GVCF") {
emitRefConfidence = org.broadinstitute.gatk.tools.walkers.haplotypecaller.ReferenceConfidenceMode.GVCF
variant_index_type = GATKVCFIndexType.LINEAR
variant_index_parameter = Option(128000)
}
if (config("inputtype", default = "dna").getString == "rna") {
dontUseSoftClippedBases = config("dontusesoftclippedbases", default = true)
recoverDanglingHeads = config("recoverdanglingheads", default = true)
stand_call_conf = config("stand_call_conf", default = 20)
stand_emit_conf = config("stand_emit_conf", default = 0)
} else {
dontUseSoftClippedBases = config("dontusesoftclippedbases", default = false)
recoverDanglingHeads = config("recoverdanglingheads", default = false)
stand_call_conf = config("stand_call_conf", default = 30)
stand_emit_conf = config("stand_emit_conf", default = 0)
}
override def beforeCmd {
super.beforeCmd
if (config("inputtype", default = "dna").getString == "rna") {
dontUseSoftClippedBases = config("dontusesoftclippedbases", default = true)
recoverDanglingHeads = config("recoverdanglingheads", default = true)
stand_call_conf = config("stand_call_conf", default = 20)
stand_emit_conf = config("stand_emit_conf", default = 0)
} else {
dontUseSoftClippedBases = config("dontusesoftclippedbases", default = false)
recoverDanglingHeads = config("recoverdanglingheads", default = false)
stand_call_conf = config("stand_call_conf", default = 30)
stand_emit_conf = config("stand_emit_conf", default = 0)
}
if (bamOutput != null && nct.getOrElse(1) > 1) {
nct = Option(1)
logger.warn("BamOutput is on, nct/threads is forced to set on 1, this option is only for debug")
......
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