Commit 853f39a6 authored by Peter van 't Hof's avatar Peter van 't Hof

Revert own scatter functions

parent 79d53026
package nl.lumc.sasc.biopet.extensions.gatk.own
import java.io.File
import nl.lumc.sasc.biopet.core.BiopetJavaCommandLineFunction
import org.broadinstitute.gatk.utils.commandline.{ Input, Output, Argument }
trait GatkGeneral extends BiopetJavaCommandLineFunction {
val analysis: String
memoryLimit = Option(3)
jarFile = config("gatk_jar", submodule = "gatk")
override val defaultVmem = "7G"
@Input(required = false)
var intervals: List[File] = Nil
if (config.contains("intervals", submodule = "gatk"))
intervals = config("intervals", submodule = "gatk").getFileList
@Input(required = false)
var excludeIntervals: List[File] = Nil
if (config.contains("exclude_intervals", submodule = "gatk"))
excludeIntervals = config("exclude_intervals", submodule = "gatk").getFileList
var reference_sequence: File = config("reference", submodule = "gatk")
var gatkKey: File = config("gatk_key", submodule = "gatk")
@Input(required = false)
var pedigree: List[File] = Nil
if (config.contains("pedigree", submodule = "gatk"))
config("pedigree", submodule = "gatk").getFileList
override def commandLine = super.commandLine +
required("--analysis_type", analysis) +
required("--reference_sequence", reference_sequence) +
repeat("--intervals", intervals) +
repeat("--excludeIntervals", excludeIntervals) +
optional("--gatk_key", gatkKey) +
repeat("--pedigree", pedigree)
}
package nl.lumc.sasc.biopet.extensions.gatk.own
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
import org.broadinstitute.gatk.utils.variant.GATKVCFIndexType
import org.broadinstitute.gatk.queue.extensions.gatk.CatVariantsGatherer
import org.broadinstitute.gatk.queue.extensions.gatk.LocusScatterFunction
import org.broadinstitute.gatk.queue.function.scattergather.ScatterGatherableFunction
import org.broadinstitute.gatk.utils.commandline.{ Input, Output, Argument, Gather }
class HaplotypeCaller(val root: Configurable) extends GatkGeneral with ScatterGatherableFunction {
val analysis = "HaplotypeCaller"
scatterClass = classOf[LocusScatterFunction]
if (config.contains("scattercount")) scatterCount = config("scattercount")
@Input(required = false)
var dbsnp: File = config("dbsnp")
@Input(required = true)
var input: List[File] = Nil
@Output(required = true)
@Gather(classOf[CatVariantsGatherer])
var out: File = _
var samplePloidy: Option[Int] = config("ploidy")
var allSitePLs: Boolean = config("allSitePLs", default = false)
var standCallConf: Option[Double] = config("stand_call_conf", default = 5.0)
var standEmitConf: Option[Double] = config("stand_emit_conf", default = 0.0)
var minMappingQualityScore: Option[Int] = config("min_mapping_quality_score", default = 20)
override def afterGraph {
super.afterGraph
memoryLimit = Option(threads * memoryLimit.getOrElse(2.0))
}
override def commandLine = super.commandLine +
repeat("-I", input) +
required("-o", out) +
optional("--sample_ploidy", samplePloidy) +
conditional(allSitePLs, "--allSitePLs") +
optional("--stand_call_conf", standCallConf) +
optional("--stand_emit_conf", standEmitConf) +
optional("--dbsnp", dbsnp) +
optional("--min_mapping_quality_score", minMappingQualityScore)
// def useGvcf() {
// emitRefConfidence = org.broadinstitute.gatk.tools.walkers.haplotypecaller.ReferenceConfidenceMode.GVCF
// variant_index_type = GATKVCFIndexType.LINEAR
// variant_index_parameter = config("variant_index_parameter", default = 128000)
// }
}
......@@ -108,8 +108,8 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
add(genotypeGVCFs)
scriptOutput.hcVcfFile = genotypeGVCFs.out
} else {
val hcGvcf = new nl.lumc.sasc.biopet.extensions.gatk.own.HaplotypeCaller(this)
hcGvcf.input = scriptOutput.bamFiles
val hcGvcf = new HaplotypeCaller(this)
hcGvcf.input_file = scriptOutput.bamFiles
hcGvcf.out = outputDir + outputName + ".hc.discovery.vcf.gz"
add(hcGvcf)
scriptOutput.hcVcfFile = hcGvcf.out
......
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