Commit 8820b625 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Function for gvcf mode

parent 7772e165
......@@ -15,22 +15,15 @@ class HaplotypeCaller(val root: Configurable) extends org.broadinstitute.gatk.qu
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)
}
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 = 0.0001)
stand_call_conf = config("stand_call_conf", default = 5)
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 = 0.0001)
stand_call_conf = config("stand_call_conf", default = 5)
stand_emit_conf = config("stand_emit_conf", default = 0)
}
if (bamOutput != null && nct.getOrElse(1) > 1) {
......@@ -38,4 +31,10 @@ class HaplotypeCaller(val root: Configurable) extends org.broadinstitute.gatk.qu
logger.warn("BamOutput is on, nct/threads is forced to set on 1, this option is only for debug")
}
}
def useGvcf() {
emitRefConfidence = org.broadinstitute.gatk.tools.walkers.haplotypecaller.ReferenceConfidenceMode.GVCF
variant_index_type = GATKVCFIndexType.LINEAR
variant_index_parameter = config("variant_index_parameter", default = 128000)
}
}
......@@ -71,7 +71,7 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
if (variantcalling) {
// Haplotypecaller with default settings
val hc = new HaplotypeCaller(this)
hc.defaults += "emitRefConfidence" -> "GVCF"
hc.useGvcf
hc.input_file = bamFiles
hc.out = outputFile
add(hc)
......@@ -91,7 +91,6 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
outputFiles += "raw_vcf" -> m2v.output
val hcAlleles = new HaplotypeCaller(this)
hcAlleles.defaults += "emitRefConfidence" -> "NONE"
hcAlleles.input_file = bamFiles
hcAlleles.out = outputDir + outputName + ".genotype_raw_alleles.vcf.gz"
hcAlleles.alleles = m2v.output
......
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