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

Fix bug on gubbins

parent deab689c
...@@ -56,12 +56,12 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript { ...@@ -56,12 +56,12 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript {
add(catConsensusVariantsSnps) add(catConsensusVariantsSnps)
val seed: Int = config("seed", default = 12345) val seed: Int = config("seed", default = 12345)
def addTreeJobs(input: File, outputDir: String, outputName: String) { def addTreeJobs(variants: File, concensusVariants: File, outputDir: String, outputName: String) {
val dirSufixRaxml = if (outputDir.endsWith(File.separator)) "raxml" else File.separator + "raxml" val dirSufixRaxml = if (outputDir.endsWith(File.separator)) "raxml" else File.separator + "raxml"
val dirSufixGubbins = if (outputDir.endsWith(File.separator)) "gubbins" else File.separator + "gubbins" val dirSufixGubbins = if (outputDir.endsWith(File.separator)) "gubbins" else File.separator + "gubbins"
val raxmlMl = new Raxml(this) val raxmlMl = new Raxml(this)
raxmlMl.input = input raxmlMl.input = variants
raxmlMl.m = config("raxml_ml_model", default = "GTRGAMMAX") raxmlMl.m = config("raxml_ml_model", default = "GTRGAMMAX")
raxmlMl.p = seed raxmlMl.p = seed
raxmlMl.n = outputName + "_ml" raxmlMl.n = outputName + "_ml"
...@@ -74,7 +74,7 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript { ...@@ -74,7 +74,7 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript {
val bootList = for (t <- 0 until numBoot) yield { val bootList = for (t <- 0 until numBoot) yield {
val raxmlBoot = new Raxml(this) val raxmlBoot = new Raxml(this)
raxmlBoot.threads = 1 raxmlBoot.threads = 1
raxmlBoot.input = input raxmlBoot.input = variants
raxmlBoot.m = config("raxml_ml_model", default = "GTRGAMMAX") raxmlBoot.m = config("raxml_ml_model", default = "GTRGAMMAX")
raxmlBoot.p = seed raxmlBoot.p = seed
raxmlBoot.b = math.abs(r.nextInt) raxmlBoot.b = math.abs(r.nextInt)
...@@ -89,7 +89,7 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript { ...@@ -89,7 +89,7 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript {
add(cat) add(cat)
val raxmlBi = new Raxml(this) val raxmlBi = new Raxml(this)
raxmlBi.input = input raxmlBi.input = concensusVariants
raxmlBi.t = raxmlMl.getBestTreeFile raxmlBi.t = raxmlMl.getBestTreeFile
raxmlBi.z = cat.output raxmlBi.z = cat.output
raxmlBi.m = config("raxml_ml_model", default = "GTRGAMMAX") raxmlBi.m = config("raxml_ml_model", default = "GTRGAMMAX")
...@@ -100,14 +100,14 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript { ...@@ -100,14 +100,14 @@ class Basty(val root: Configurable) extends QScript with MultiSampleQScript {
add(raxmlBi) add(raxmlBi)
val gubbins = new RunGubbins(this) val gubbins = new RunGubbins(this)
gubbins.fastafile = input gubbins.fastafile = concensusVariants
gubbins.startingTree = raxmlBi.getBipartitionsFile gubbins.startingTree = raxmlBi.getBipartitionsFile
gubbins.outputDirectory = outputDir + dirSufixGubbins gubbins.outputDirectory = outputDir + dirSufixGubbins
add(gubbins) add(gubbins)
} }
addTreeJobs(catVariantsSnps.output, outputDir + "trees" + File.separator + "snps_only", "snps_only") addTreeJobs(catVariantsSnps.output, catConsensusVariants.output, outputDir + "trees" + File.separator + "snps_only", "snps_only")
addTreeJobs(catVariants.output, outputDir + "trees" + File.separator + "snps_indels", "snps_indels") addTreeJobs(catVariants.output, catConsensusVariantsSnps.output, outputDir + "trees" + File.separator + "snps_indels", "snps_indels")
} }
// Called for each sample // Called for each sample
......
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