Skip to content
Snippets Groups Projects
Commit 046d7d2b authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Adding exac annotation step

parent 4459b837
No related branches found
No related tags found
No related merge requests found
...@@ -56,17 +56,36 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum ...@@ -56,17 +56,36 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum
normalizer.outputVcf = swapExt(outputDir, vep.output, ".vcf", ".normalized.vcf.gz") normalizer.outputVcf = swapExt(outputDir, vep.output, ".vcf", ".normalized.vcf.gz")
add(normalizer) add(normalizer)
// Optional annotation steps, depend is some files existing in the config
val gonlVcfFile: Option[File] = config("gonl_vcf") val gonlVcfFile: Option[File] = config("gonl_vcf")
val exacVcfFile: Option[File] = config("exac_vcf")
var outputFile = normalizer.outputVcf
gonlVcfFile match { gonlVcfFile match {
case Some(gonlVcfFile) => { case Some(gonlVcfFile) => {
val vcfWithVcf = new VcfWithVcf(this) val vcfWithVcf = new VcfWithVcf(this)
vcfWithVcf.input = normalizer.outputVcf vcfWithVcf.input = outputFile
vcfWithVcf.secondaryVcf = gonlVcfFile vcfWithVcf.secondaryVcf = gonlVcfFile
vcfWithVcf.output = swapExt(outputDir, normalizer.outputVcf, ".vcf.gz", ".gonl.vcf.gz") vcfWithVcf.output = swapExt(outputDir, normalizer.outputVcf, ".vcf.gz", ".gonl.vcf.gz")
vcfWithVcf.fields ::= ("AF", "AF_gonl", None) vcfWithVcf.fields ::= ("AF", "AF_gonl", None)
add(vcfWithVcf) add(vcfWithVcf)
outputFile = vcfWithVcf.output
}
case _ =>
}
exacVcfFile match {
case Some(exacVcfFile) => {
val vcfWithVcf = new VcfWithVcf(this)
vcfWithVcf.input = outputFile
vcfWithVcf.secondaryVcf = exacVcfFile
vcfWithVcf.output = swapExt(outputDir, outputFile, ".vcf.gz", ".exac.vcf.gz")
vcfWithVcf.fields ::= ("MAF", "MAF_exac", None)
add(vcfWithVcf)
outputFile = vcfWithVcf.output
} }
case _ => normalizer.outputVcf case _ =>
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment