Commit 7fdfe224 authored by Peter van 't Hof's avatar Peter van 't Hof

Test with own scatter functions

parent 9ef68854
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] = config("intervals", submodule = "gatk").getFileList
@Input(required = false)
var excludeIntervals: List[File] = 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] = 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 output: 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", output) +
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)
// }
}
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