Commit 1aeba6d1 authored by Peter van 't Hof's avatar Peter van 't Hof

Convert analysis_type to abstract value

parent 59399b66
......@@ -13,8 +13,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ }
class AnalyzeCovariates(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction {
analysisName = "AnalyzeCovariates"
analysis_type = "AnalyzeCovariates"
def analysis_type = "AnalyzeCovariates"
scatterClass = classOf[LocusScatterFunction]
setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false }
......
......@@ -57,8 +57,7 @@ import org.broadinstitute.gatk.utils.commandline.Input
import org.broadinstitute.gatk.utils.commandline.Output
class ApplyRecalibration(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction {
analysisName = "ApplyRecalibration"
analysis_type = "ApplyRecalibration"
def analysis_type = "ApplyRecalibration"
scatterClass = classOf[LocusScatterFunction]
setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false }
......
......@@ -25,8 +25,7 @@ import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ }
//TODO: check gathering
class BaseRecalibrator(val root: Configurable) extends CommandLineGATK /* with ScatterGatherableFunction */ {
analysisName = "BaseRecalibrator"
analysis_type = "BaseRecalibrator"
def analysis_type = "BaseRecalibrator"
//TODO: check gathering
//scatterClass = classOf[ReadScatterFunction]
//setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false }
......
......@@ -13,8 +13,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import org.broadinstitute.gatk.utils.commandline.{ Gather, Input, Output, _ }
class CombineGVCFs(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction {
analysisName = "CombineGVCFs"
analysis_type = "CombineGVCFs"
def analysis_type = "CombineGVCFs"
scatterClass = classOf[LocusScatterFunction]
setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false }
......
......@@ -13,8 +13,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ }
class CombineVariants(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction {
analysisName = "CombineVariants"
analysis_type = "CombineVariants"
def analysis_type = "CombineVariants"
scatterClass = classOf[LocusScatterFunction]
setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false }
......
......@@ -7,13 +7,12 @@ import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile
import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Input, Output }
trait CommandLineGATK extends BiopetJavaCommandLineFunction with Reference with Version {
analysisName = "CommandLineGATK"
analysisName = analysis_type
javaMainClass = "org.broadinstitute.gatk.engine.CommandLineGATK"
jarFile = config("gatk_jar")
/** Name of the tool to run */
@Argument(fullName = "analysis_type", shortName = "T", doc = "Name of the tool to run", required = true, exclusiveOf = "", validation = "")
var analysis_type: String = _
def analysis_type: String
/** Input file containing sequence data (BAM or CRAM) */
@Input(fullName = "input_file", shortName = "I", doc = "Input file containing sequence data (BAM or CRAM)", required = false, exclusiveOf = "", validation = "")
......
......@@ -43,8 +43,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ }
class GenotypeGVCFs(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction {
analysisName = "GenotypeGVCFs"
analysis_type = "GenotypeGVCFs"
def analysis_type = "GenotypeGVCFs"
scatterClass = classOf[LocusScatterFunction]
setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false }
......
......@@ -5,29 +5,17 @@
*/
package nl.lumc.sasc.biopet.extensions.gatk.broad
// if (config("inputtype", default = "dna").asString == "rna") {
// dontUseSoftClippedBases = config("dontusesoftclippedbases", default = true)
// stand_call_conf = config("stand_call_conf", default = 5)
// stand_emit_conf = config("stand_emit_conf", default = 0)
// } else {
// dontUseSoftClippedBases = config("dontusesoftclippedbases", default = false)
// stand_call_conf = config("stand_call_conf", default = 5)
// stand_emit_conf = config("stand_emit_conf", default = 0)
// }
//
import java.io.File
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.extensions.gatk._
import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import nl.lumc.sasc.biopet.utils.VcfUtils
import org.broadinstitute.gatk.utils.commandline.{Argument, Gather, Input, _}
import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Input, _ }
import org.broadinstitute.gatk.utils.variant.GATKVCFIndexType
class HaplotypeCaller(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction {
analysisName = "HaplotypeCaller"
analysis_type = "HaplotypeCaller"
def analysis_type = "HaplotypeCaller"
scatterClass = classOf[LocusScatterFunction]
setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false }
......
......@@ -13,8 +13,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ }
class IndelRealigner(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction {
analysisName = "IndelRealigner"
analysis_type = "IndelRealigner"
def analysis_type = "IndelRealigner"
scatterClass = classOf[ReadScatterFunction]
setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = true }
......
......@@ -13,8 +13,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import org.broadinstitute.gatk.utils.commandline._
class PrintReads(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction {
analysisName = "PrintReads"
analysis_type = "PrintReads"
def analysis_type = "PrintReads"
scatterClass = classOf[ReadScatterFunction]
setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = true }
......
......@@ -13,8 +13,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Input, _ }
class RealignerTargetCreator(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction {
analysisName = "RealignerTargetCreator"
analysis_type = "RealignerTargetCreator"
def analysis_type = "RealignerTargetCreator"
scatterClass = classOf[LocusScatterFunction]
setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false }
......
......@@ -30,8 +30,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ }
class SelectVariants(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction {
analysisName = "SelectVariants"
analysis_type = "SelectVariants"
def analysis_type = "SelectVariants"
scatterClass = classOf[LocusScatterFunction]
setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false }
......
......@@ -53,8 +53,7 @@ import nl.lumc.sasc.biopet.core.ScatterGatherableFunction
import org.broadinstitute.gatk.utils.commandline.{ Gather, Input, Output, _ }
class UnifiedGenotyper(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction {
analysisName = "UnifiedGenotyper"
analysis_type = "UnifiedGenotyper"
def analysis_type = "UnifiedGenotyper"
scatterClass = classOf[LocusScatterFunction]
setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false }
......
......@@ -32,8 +32,7 @@ import org.broadinstitute.gatk.queue.extensions.gatk.{ CatVariantsGatherer, GATK
import org.broadinstitute.gatk.utils.commandline.{ Argument, Gather, Output, _ }
class VariantAnnotator(val root: Configurable) extends CommandLineGATK with ScatterGatherableFunction {
analysisName = "VariantAnnotator"
analysis_type = "VariantAnnotator"
def analysis_type = "VariantAnnotator"
scatterClass = classOf[LocusScatterFunction]
setupScatterFunction = { case scatter: GATKScatterFunction => scatter.includeUnmapped = false }
......
......@@ -46,8 +46,7 @@ import org.broadinstitute.gatk.utils.commandline.Input
import org.broadinstitute.gatk.utils.commandline.Output
class VariantEval(val root: Configurable) extends CommandLineGATK {
analysisName = "VariantEval"
analysis_type = "VariantEval"
def analysis_type = "VariantEval"
/** An output file created by the walker. Will overwrite contents if file exists */
@Output(fullName = "out", shortName = "o", doc = "An output file created by the walker. Will overwrite contents if file exists", required = false, exclusiveOf = "", validation = "")
......
......@@ -52,8 +52,7 @@ import org.broadinstitute.gatk.queue.extensions.gatk.{ CatVariantsGatherer, Tagg
import org.broadinstitute.gatk.utils.commandline.{ Gather, Input, Output, _ }
class VariantRecalibrator(val root: Configurable) extends CommandLineGATK {
analysisName = "VariantRecalibrator"
analysis_type = "VariantRecalibrator"
def analysis_type = "VariantRecalibrator"
/** Recalibration mode to employ */
@Argument(fullName = "mode", shortName = "mode", doc = "Recalibration mode to employ", required = true, exclusiveOf = "", validation = "")
......
......@@ -15,17 +15,17 @@
*/
package nl.lumc.sasc.biopet.core
import java.io.{File, FileInputStream, PrintWriter}
import java.io.{ File, FileInputStream, PrintWriter }
import java.security.MessageDigest
import nl.lumc.sasc.biopet.utils.Logging
import org.broadinstitute.gatk.utils.commandline.{Gather, Input, Output}
import org.broadinstitute.gatk.utils.commandline.{ Gather, Input, Output }
import org.broadinstitute.gatk.utils.runtime.ProcessSettings
import org.ggf.drmaa.JobTemplate
import scala.collection.mutable
import scala.io.Source
import scala.sys.process.{Process, ProcessLogger}
import scala.sys.process.{ Process, ProcessLogger }
import scala.collection.JavaConversions._
/** Biopet command line trait to auto check executable and cluster values */
......
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