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

Change to config

parent 0bbd5588
......@@ -18,10 +18,10 @@ class Flexiprep(val root: Configurable) extends QScript with BiopetQScript {
var input_R2: File = _
@Argument(doc = "Skip Trim fastq files", shortName = "skiptrim", required = false)
var skipTrim: Boolean = false
var skipTrim: Boolean = config("skiptrim", default = false)
@Argument(doc = "Skip Clip fastq files", shortName = "skipclip", required = false)
var skipClip: Boolean = false
var skipClip: Boolean = config("skipclip", default = false)
@Argument(doc = "Sample name", shortName = "sample", required = true)
var sampleName: String = _
......@@ -43,8 +43,6 @@ class Flexiprep(val root: Configurable) extends QScript with BiopetQScript {
val summary = new FlexiprepSummary(this)
def init() {
if (!skipTrim) skipTrim = config("skiptrim", default = false)
if (!skipClip) skipClip = config("skipclip", default = false)
if (input_R1 == null) throw new IllegalStateException("Missing R1 on flexiprep module")
if (outputDir == null) throw new IllegalStateException("Missing Output directory on flexiprep module")
if (sampleName == null) throw new IllegalStateException("Missing Sample name on flexiprep module")
......
......@@ -18,18 +18,15 @@ class GatkBenchmarkGenotyping(val root: Configurable) extends QScript with Biope
@Input(doc = "Gvcf files", shortName = "I", required = false)
var gvcfFiles: List[File] = Nil
@Argument(doc = "Reference", shortName = "R", required = false)
var reference: File = _
var reference: File = config("reference")
@Argument(doc = "Dbsnp", shortName = "dbsnp", required = false)
var dbsnp: File = _
var dbsnp: File = config("dbsnp")
def init() {
if (config.contains("gvcffiles")) for (file <- config("gvcffiles").getList) {
gvcfFiles ::= file.toString
}
if (reference == null) reference = config("reference")
if (dbsnp == null) dbsnp = config("dbsnp")
if (outputDir == null) throw new IllegalStateException("Missing Output directory on gatk module")
else if (!outputDir.endsWith("/")) outputDir += "/"
}
......
......@@ -13,10 +13,10 @@ class GatkGenotyping(val root: Configurable) extends QScript with BiopetQScript
var inputGvcfs: List[File] = Nil
@Argument(doc = "Reference", shortName = "R", required = false)
var reference: File = _
var reference: File = config("reference")
@Argument(doc = "Dbsnp", shortName = "dbsnp", required = false)
var dbsnp: File = _
var dbsnp: File = config("dbsnp")
@Argument(doc = "OutputName", required = false)
var outputName: String = "genotype"
......@@ -28,8 +28,6 @@ class GatkGenotyping(val root: Configurable) extends QScript with BiopetQScript
var samples: List[String] = Nil
def init() {
if (reference == null) reference = config("reference")
if (dbsnp == null) dbsnp = config("dbsnp")
if (outputFile == null) outputFile = outputDir + outputName + ".vcf.gz"
if (outputDir == null) throw new IllegalStateException("Missing Output directory on gatk module")
else if (!outputDir.endsWith("/")) outputDir += "/"
......
......@@ -27,17 +27,17 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
var mergeGvcfs: Boolean = false
@Argument(doc = "Joint variantcalling", shortName = "jointVariantCalling", required = false)
var jointVariantcalling = false
var jointVariantcalling = config("joint_variantcalling", default = false)
@Argument(doc = "Joint genotyping", shortName = "jointGenotyping", required = false)
var jointGenotyping = false
var jointGenotyping = config("joint_genotyping", default = false)
var singleSampleCalling = true
var reference: File = _
var dbsnp: File = _
var singleSampleCalling = config("single_sample_calling", default = true)
var reference: File = config("reference", required = true)
var dbsnp: File = config("dbsnp")
var gvcfFiles: List[File] = Nil
var finalBamFiles: List[File] = Nil
var useAllelesOption: Boolean = _
var useAllelesOption: Boolean = config("use_alleles_option", default = false)
class LibraryOutput extends AbstractLibraryOutput {
var mappedBamFile: File = _
......@@ -49,15 +49,9 @@ class GatkPipeline(val root: Configurable) extends QScript with MultiSampleQScri
}
def init() {
useAllelesOption = config("use_alleles_option", default = false)
reference = config("reference", required = true)
dbsnp = config("dbsnp")
if (config.contains("target_bed")) {
defaults ++= Map("gatk" -> Map(("intervals" -> config("target_bed").getStringList)))
}
jointVariantcalling = config("joint_variantcalling", default = false)
jointGenotyping = config("joint_genotyping", default = false)
singleSampleCalling = config("single_sample_calling", default = true)
if (config.contains("gvcfFiles"))
for (file <- config("gvcfFiles").getList)
gvcfFiles :+= file.toString
......
......@@ -24,10 +24,10 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
var rawVcfInput: File = _
@Argument(doc = "Reference", shortName = "R", required = false)
var reference: File = _
var reference: File = config("reference", required = true)
@Argument(doc = "Dbsnp", shortName = "dbsnp", required = false)
var dbsnp: File = _
var dbsnp: File = config("dbsnp")
@Argument(doc = "OutputName", required = false)
var outputName: String = _
......@@ -35,21 +35,14 @@ class GatkVariantcalling(val root: Configurable) extends QScript with BiopetQScr
@Argument(doc = "Sample name", required = false)
var sampleID: String = _
var preProcesBams: Option[Boolean] = None
var preProcesBams: Option[Boolean] = config("pre_proces_bams", default = true)
var variantcalling: Boolean = true
var doublePreProces: Option[Boolean] = None
var useHaplotypecaller: Option[Boolean] = None
var useUnifiedGenotyper: Option[Boolean] = None
var useAllelesOption: Option[Boolean] = None
var doublePreProces: Option[Boolean] = config("double_pre_proces", default = true)
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)
def init() {
if (useAllelesOption == None) useAllelesOption = config("use_alleles_option", default = false)
if (preProcesBams == None) preProcesBams = config("pre_proces_bams", default = true)
if (doublePreProces == None) doublePreProces = config("double_pre_proces", default = true)
if (useHaplotypecaller == None) useHaplotypecaller = config("use_haplotypecaller", default = true)
if (useUnifiedGenotyper == None) useUnifiedGenotyper = config("use_unifiedgenotyper", default = false)
if (reference == null) reference = config("reference", required = true)
if (dbsnp == null) dbsnp = config("dbsnp")
if (outputName == null && sampleID != null) outputName = sampleID
else if (outputName == null) outputName = "noname"
if (outputDir == null) throw new IllegalStateException("Missing Output directory on gatk module")
......
......@@ -16,7 +16,7 @@ class GatkVcfSampleCompare(val root: Configurable) extends QScript with BiopetQS
var vcfFiles: List[File] = _
@Argument(doc = "Reference", shortName = "R", required = false)
var reference: File = _
var reference: File = config("reference")
@Argument(doc = "Target bed", shortName = "targetBed", required = false)
var targetBed: List[File] = Nil
......@@ -29,7 +29,6 @@ class GatkVcfSampleCompare(val root: Configurable) extends QScript with BiopetQS
def generalSampleDir = outputDir + "samples/"
def init() {
if (reference == null) reference = config("reference")
if (config.contains("target_bed"))
for (bed <- config("target_bed").getList)
targetBed :+= bed.toString
......
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