Commit 06a147a3 authored by Peter van 't Hof's avatar Peter van 't Hof

Adding bqsr implementation

parent f4458933
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
package nl.lumc.sasc.biopet.pipelines.shiva.variantcallers package nl.lumc.sasc.biopet.pipelines.shiva.variantcallers
import nl.lumc.sasc.biopet.extensions.gatk import nl.lumc.sasc.biopet.extensions.gatk
import nl.lumc.sasc.biopet.utils.Logging import nl.lumc.sasc.biopet.extensions.gatk.BqsrGather
import nl.lumc.sasc.biopet.utils.config.Configurable import nl.lumc.sasc.biopet.utils.config.Configurable
/** Allele mode for Haplotypecaller */ /** Allele mode for Haplotypecaller */
...@@ -33,6 +33,13 @@ class HaplotypeCallerAllele(val parent: Configurable) extends Variantcaller { ...@@ -33,6 +33,13 @@ class HaplotypeCallerAllele(val parent: Configurable) extends Variantcaller {
def biopetScript() { def biopetScript() {
val hc = gatk.HaplotypeCaller(this, inputBams.values.toList, outputFile) val hc = gatk.HaplotypeCaller(this, inputBams.values.toList, outputFile)
hc.alleles = Some(alleles) hc.alleles = Some(alleles)
hc.BQSR = if (inputBqsrFiles.isEmpty) None else {
val gather = new BqsrGather
gather.inputBqsrFiles = inputBqsrFiles.values.toList
gather.outputBqsrFile = new File(outputDir, "bqsr.merge")
add(gather)
Some(gather.outputBqsrFile)
}
hc.genotyping_mode = Some("GENOTYPE_GIVEN_ALLELES") hc.genotyping_mode = Some("GENOTYPE_GIVEN_ALLELES")
add(hc) add(hc)
} }
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
package nl.lumc.sasc.biopet.pipelines.shiva.variantcallers package nl.lumc.sasc.biopet.pipelines.shiva.variantcallers
import nl.lumc.sasc.biopet.extensions.gatk import nl.lumc.sasc.biopet.extensions.gatk
import nl.lumc.sasc.biopet.extensions.gatk.BqsrGather
import nl.lumc.sasc.biopet.utils.config.Configurable import nl.lumc.sasc.biopet.utils.config.Configurable
/** Allele mode for GenotyperAllele */ /** Allele mode for GenotyperAllele */
...@@ -33,6 +34,13 @@ class UnifiedGenotyperAllele(val parent: Configurable) extends Variantcaller { ...@@ -33,6 +34,13 @@ class UnifiedGenotyperAllele(val parent: Configurable) extends Variantcaller {
val ug = gatk.UnifiedGenotyper(this, inputBams.values.toList, outputFile) val ug = gatk.UnifiedGenotyper(this, inputBams.values.toList, outputFile)
ug.alleles = Some(alleles) ug.alleles = Some(alleles)
ug.genotyping_mode = Some("GENOTYPE_GIVEN_ALLELES") ug.genotyping_mode = Some("GENOTYPE_GIVEN_ALLELES")
ug.BQSR = if (inputBqsrFiles.isEmpty) None else {
val gather = new BqsrGather
gather.inputBqsrFiles = inputBqsrFiles.values.toList
gather.outputBqsrFile = new File(outputDir, "bqsr.merge")
add(gather)
Some(gather.outputBqsrFile)
}
add(ug) add(ug)
} }
} }
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