Commit 2865ff53 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added option to disable raw caller

parent 109ff2b3
......@@ -89,17 +89,20 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
) yield file
val allRawVcfFiles = for ((sampleID, sampleOutput) <- samplesOutput) yield sampleOutput.variantcalling.rawFilterVcfFile
val cvRaw = CombineVariants(this, allRawVcfFiles.toList, outputDir + "variantcalling/multisample.raw.vcf.gz")
add(cvRaw)
val gatkVariantcalling = new GatkVariantcalling(this) {
override protected lazy val configName = "gatkvariantcalling"
override def configPath: List[String] = "multisample" :: super.configPath
}
if (gatkVariantcalling.useMpileup) {
val cvRaw = CombineVariants(this, allRawVcfFiles.toList, outputDir + "variantcalling/multisample.raw.vcf.gz")
add(cvRaw)
gatkVariantcalling.rawVcfInput = cvRaw.out
}
gatkVariantcalling.preProcesBams = Some(false)
gatkVariantcalling.doublePreProces = Some(false)
gatkVariantcalling.inputBams = allBamfiles.toList
gatkVariantcalling.rawVcfInput = cvRaw.out
gatkVariantcalling.outputDir = outputDir + "variantcalling"
gatkVariantcalling.outputName = "multisample"
gatkVariantcalling.init
......
......@@ -41,6 +41,7 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
var useHaplotypecaller: Option[Boolean] = config("use_haplotypecaller", default = true)
var useUnifiedGenotyper: Option[Boolean] = config("use_unifiedgenotyper", default = false)
var useAllelesOption: Option[Boolean] = config("use_alleles_option", default = false)
var useMpileup: Option[Boolean] = config("use_mpileup", default = true)
def init() {
if (outputName == null && sampleID != null) outputName = sampleID
......@@ -113,6 +114,7 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
}
// Generate raw vcf
if (useMpileup) {
if (sampleID != null && scriptOutput.bamFiles.size == 1) {
val m2v = new MpileupToVcf(this)
m2v.inputBam = scriptOutput.bamFiles.head
......@@ -133,7 +135,9 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
} else if (rawVcfInput != null) scriptOutput.rawFilterVcfFile = rawVcfInput
if (scriptOutput.rawFilterVcfFile == null) throw new IllegalStateException("Files can't be empty")
mergBuffer += ("9.raw" -> scriptOutput.rawFilterVcfFile)
}
// Allele mode
if (useAllelesOption.get) {
val mergeAlleles = MergeAlleles(this, mergeList.toList, outputDir + "raw.allele__temp_only.vcf.gz")
add(mergeAlleles, isIntermediate = true)
......
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