Commit 04f343cb authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Adding decompose option to shiva

parent cf338a86
......@@ -19,7 +19,7 @@ import nl.lumc.sasc.biopet.core.summary.SummaryQScript
import nl.lumc.sasc.biopet.core.{ Reference, SampleLibraryTag }
import nl.lumc.sasc.biopet.extensions.gatk.{ CombineVariants, GenotypeConcordance }
import nl.lumc.sasc.biopet.extensions.tools.VcfStats
import nl.lumc.sasc.biopet.extensions.vt.VtNormalize
import nl.lumc.sasc.biopet.extensions.vt.{VtDecompose, VtNormalize}
import nl.lumc.sasc.biopet.pipelines.bammetrics.TargetRegions
import nl.lumc.sasc.biopet.pipelines.shiva.variantcallers._
import nl.lumc.sasc.biopet.utils.{ BamUtils, Logging }
......@@ -89,12 +89,28 @@ trait ShivaVariantcallingTrait extends SummaryQScript
add(caller)
addStats(caller.outputFile, caller.name)
val normalize: Boolean = config("execute_vt_normalize", default = false)
if (normalize) {
val vt = new VtNormalize(this)
vt.inputVcf = caller.outputFile
vt.outputVcf = swapExt(caller.outputDir, caller.outputFile, ".vcf.gz", ".normaize.vcf.gz")
add(vt)
cv.addInput(vt.outputVcf, caller.name)
val decompose: Boolean = config("execute_vt_decompose", default = false)
val vtNormalize = new VtNormalize(this)
vtNormalize.inputVcf = caller.outputFile
val vtDecompose = new VtDecompose(this)
if (normalize && decompose) {
vtNormalize.outputVcf = swapExt(caller.outputDir, caller.outputFile, ".vcf.gz", ".normaize.vcf.gz")
add(vtNormalize)
vtDecompose.inputVcf = vtNormalize.outputVcf
vtDecompose.outputVcf = swapExt(caller.outputDir, vtNormalize.outputVcf, ".vcf.gz", ".decompose.vcf.gz")
add(vtDecompose)
cv.addInput(vtDecompose.outputVcf, caller.name)
} else if (normalize && !decompose) {
vtNormalize.outputVcf = swapExt(caller.outputDir, caller.outputFile, ".vcf.gz", ".normaize.vcf.gz")
add(vtNormalize)
cv.addInput(vtNormalize.outputVcf, caller.name)
} else if (!normalize && decompose) {
vtDecompose.inputVcf = caller.outputFile
vtDecompose.outputVcf = swapExt(caller.outputDir, caller.outputFile, ".vcf.gz", ".decompose.vcf.gz")
add(vtDecompose)
cv.addInput(vtDecompose.outputVcf, caller.name)
} else cv.addInput(caller.outputFile, caller.name)
}
add(cv)
......
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