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

Fix output dirs and set default single sample calling off

parent 7f1ff523
......@@ -25,7 +25,8 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript {
"ploidy" -> 1,
"use_haplotypecaller" -> false,
"use_unifiedgenotyper" -> true,
"joint_variantcalling" -> true
"joint_variantcalling" -> true,
"single_sample_calling" -> false
), super.defaults)
var gatkPipeline: GatkPipeline = new GatkPipeline(qscript)
......@@ -60,8 +61,8 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript {
}
def addMultiSampleJobs(): Unit = {
val refVariants = addGenerateFasta(null, new File(outputDir, "reference"), outputName = "reference")
val refVariantSnps = addGenerateFasta(null, new File(outputDir, "reference"), outputName = "reference", snpsOnly = true)
val refVariants = addGenerateFasta(null, new File(outputDir, "fastas" + File.separator + "reference"), outputName = "reference")
val refVariantSnps = addGenerateFasta(null, new File(outputDir, "fastas" + File.separator + "reference"), outputName = "reference", snpsOnly = true)
val catVariants = Cat(this, refVariants.variants :: samples.map(_._2.output.variants).toList,
new File(outputDir, "fastas" + File.separator + "variant.fasta"))
......@@ -94,7 +95,7 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript {
raxmlMl.m = config("raxml_ml_model", default = "GTRGAMMAX")
raxmlMl.p = seed
raxmlMl.n = outputName + "_ml"
raxmlMl.w = outputDir + dirSufixRaxml
raxmlMl.w = dirSufixRaxml
raxmlMl.N = config("ml_runs", default = 20, submodule = "raxml")
add(raxmlMl)
......@@ -114,7 +115,7 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript {
raxmlBoot.getBootstrapFile
}
val cat = Cat(this, bootList.toList, outputDir + "/boot_list")
val cat = Cat(this, bootList.toList, new File(outputDir, "/boot_list"))
add(cat)
val raxmlBi = new Raxml(this)
......@@ -125,7 +126,7 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript {
raxmlBi.p = seed
raxmlBi.f = "b"
raxmlBi.n = outputName + "_bi"
raxmlBi.w = outputDir + dirSufixRaxml
raxmlBi.w = dirSufixRaxml
add(raxmlBi)
val gubbins = new RunGubbins(this)
......@@ -150,9 +151,9 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript {
if (gatkPipeline.samples.contains(sampleName)) {
bastyGenerateFasta.bamFile = gatkPipeline.samples(sampleName).gatkVariantcalling.scriptOutput.bamFiles.head
}
bastyGenerateFasta.outputVariants = outputDir + bastyGenerateFasta.outputName + ".variants" + (if (snpsOnly) ".snps_only" else "") + ".fasta"
bastyGenerateFasta.outputConsensus = outputDir + bastyGenerateFasta.outputName + ".consensus" + (if (snpsOnly) ".snps_only" else "") + ".fasta"
bastyGenerateFasta.outputConsensusVariants = outputDir + bastyGenerateFasta.outputName + ".consensus_variants" + (if (snpsOnly) ".snps_only" else "") + ".fasta"
bastyGenerateFasta.outputVariants = new File(outputDir, bastyGenerateFasta.outputName + ".variants" + (if (snpsOnly) ".snps_only" else "") + ".fasta")
bastyGenerateFasta.outputConsensus = new File(outputDir, bastyGenerateFasta.outputName + ".consensus" + (if (snpsOnly) ".snps_only" else "") + ".fasta")
bastyGenerateFasta.outputConsensusVariants = new File(outputDir, bastyGenerateFasta.outputName + ".consensus_variants" + (if (snpsOnly) ".snps_only" else "") + ".fasta")
bastyGenerateFasta.sampleName = sampleName
bastyGenerateFasta.snpsOnly = snpsOnly
qscript.add(bastyGenerateFasta)
......
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