Commit 5121ff20 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added vcfstats to gatk pipeline

parent 25a8db4f
...@@ -7,7 +7,7 @@ package nl.lumc.sasc.biopet.pipelines.gatk ...@@ -7,7 +7,7 @@ package nl.lumc.sasc.biopet.pipelines.gatk
import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand } import nl.lumc.sasc.biopet.core.{ BiopetQScript, PipelineCommand }
import java.io.File import java.io.File
import nl.lumc.sasc.biopet.tools.{ MpileupToVcf, VcfFilter, MergeAlleles } import nl.lumc.sasc.biopet.tools.{ VcfStats, MpileupToVcf, VcfFilter, MergeAlleles }
import nl.lumc.sasc.biopet.core.config.Configurable import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.extensions.gatk.{ AnalyzeCovariates, BaseRecalibrator, GenotypeGVCFs, HaplotypeCaller, IndelRealigner, PrintReads, RealignerTargetCreator, SelectVariants, CombineVariants, UnifiedGenotyper } import nl.lumc.sasc.biopet.extensions.gatk.{ AnalyzeCovariates, BaseRecalibrator, GenotypeGVCFs, HaplotypeCaller, IndelRealigner, PrintReads, RealignerTargetCreator, SelectVariants, CombineVariants, UnifiedGenotyper }
import nl.lumc.sasc.biopet.extensions.picard.MarkDuplicates import nl.lumc.sasc.biopet.extensions.picard.MarkDuplicates
...@@ -197,6 +197,12 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr ...@@ -197,6 +197,12 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
val cvFinal = CombineVariants(this, mergeList.toList, outputDir + outputName + ".final.vcf.gz") val cvFinal = CombineVariants(this, mergeList.toList, outputDir + outputName + ".final.vcf.gz")
cvFinal.genotypemergeoption = org.broadinstitute.gatk.utils.variant.GATKVariantContextUtils.GenotypeMergeType.UNSORTED cvFinal.genotypemergeoption = org.broadinstitute.gatk.utils.variant.GATKVariantContextUtils.GenotypeMergeType.UNSORTED
add(cvFinal) add(cvFinal)
val vcfStats = new VcfStats(this)
vcfStats.input = cvFinal.out
vcfStats.setOutputDir(outputDir + File.separator + "vcfstats")
add(vcfStats)
scriptOutput.finalVcfFile = cvFinal.out scriptOutput.finalVcfFile = cvFinal.out
} }
} }
......
...@@ -22,7 +22,14 @@ class VcfStats(val root: Configurable) extends BiopetJavaCommandLineFunction { ...@@ -22,7 +22,14 @@ class VcfStats(val root: Configurable) extends BiopetJavaCommandLineFunction {
var input: File = _ var input: File = _
@Output(doc = "Output fastq", shortName = "o", required = true) @Output(doc = "Output fastq", shortName = "o", required = true)
var output: File = _ protected var generalTsv: File = _
protected var outputDir: String = _
def setOutputDir(dir: String): Unit = {
outputDir = dir
generalTsv = new File(dir + File.separator + "genotype_general.tsv")
}
/** /**
* Creates command to execute extension * Creates command to execute extension
...@@ -30,7 +37,7 @@ class VcfStats(val root: Configurable) extends BiopetJavaCommandLineFunction { ...@@ -30,7 +37,7 @@ class VcfStats(val root: Configurable) extends BiopetJavaCommandLineFunction {
*/ */
override def commandLine = super.commandLine + override def commandLine = super.commandLine +
required("-I", input) + required("-I", input) +
required("-o", output) required("-o", outputDir)
} }
object VcfStats extends ToolCommand { object VcfStats extends ToolCommand {
......
Supports Markdown
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