Commit d3473e22 authored by Sander Bollen's avatar Sander Bollen
Browse files

Merge branch 'fix-aligners' into 'develop'

Fix aligners

Some aligner are failing in testing, this should fix those issues

See merge request !217
parents 8b320e53 e9a3492b
......@@ -58,34 +58,37 @@ class Bowtie(val root: Configurable) extends BiopetCommandLineFunction with Refe
var strata: Boolean = config("strata", default = false)
var maqerr: Option[Int] = config("maqerr")
var maxins: Option[Int] = config("maxins")
var largeIndex: Boolean = config("large-index", default = false)
override def beforeGraph() {
super.beforeGraph()
if (reference == null) reference = referenceFasta()
val basename = reference.getName.stripSuffix(".fasta").stripSuffix(".fa")
if (reference.getParentFile.list().toList.filter(_.startsWith(basename)).exists(_.endsWith(".ebwtl")))
largeIndex = config("large-index", default = true)
}
/** return commandline to execute */
def cmdLine = {
required(executable) +
optional("--threads", threads) +
conditional(sam, "--sam") +
conditional(best, "--best") +
conditional(strata, "--strata") +
optional("--sam-RG", sam_RG) +
optional("--seedlen", seedlen) +
optional("--seedmms", seedmms) +
optional("-k", k) +
optional("-m", m) +
optional("--maxbts", maxbts) +
optional("--maqerr", maqerr) +
optional("--maxins", maxins) +
required(reference) +
(R2 match {
case Some(r2) =>
required("-1", R1) +
optional("-2", r2)
case _ => required(R1)
}) +
" > " + required(output)
}
def cmdLine = required(executable) +
optional("--threads", threads) +
conditional(sam, "--sam") +
conditional(largeIndex, "--large-index") +
conditional(best, "--best") +
conditional(strata, "--strata") +
optional("--sam-RG", sam_RG) +
optional("--seedlen", seedlen) +
optional("--seedmms", seedmms) +
optional("-k", k) +
optional("-m", m) +
optional("--maxbts", maxbts) +
optional("--maqerr", maqerr) +
optional("--maxins", maxins) +
required(reference.getAbsolutePath.stripSuffix(".fa").stripSuffix(".fasta")) +
(R2 match {
case Some(r2) =>
required("-1", R1) +
optional("-2", r2)
case _ => required(R1)
}) +
" > " + required(output)
}
\ No newline at end of file
......@@ -72,7 +72,7 @@ class Star(val root: Configurable) extends BiopetCommandLineFunction with Refere
if (reference == null) reference = referenceFasta()
genomeDir = config("genomeDir", new File(reference.getAbsoluteFile.getParent, "star"))
if (outFileNamePrefix != null && !outFileNamePrefix.endsWith(".")) outFileNamePrefix += "."
val prefix = if (outFileNamePrefix != null) outputDir + outFileNamePrefix else outputDir
val prefix = if (outFileNamePrefix != null) outputDir + File.separator + outFileNamePrefix else outputDir + File.separator
if (runmode == null) {
outputSam = new File(prefix + "Aligned.out.sam")
outputTab = new File(prefix + "SJ.out.tab")
......
......@@ -264,6 +264,16 @@ class Tophat(val root: Configurable) extends BiopetCommandLineFunction with Refe
var rg_platform: Option[String] = config("rg_platform")
override def beforeGraph: Unit = {
super.beforeGraph
if (bowtie1 && !new File(bowtie_index).getParentFile.list().toList
.filter(_.startsWith(new File(bowtie_index).getName)).exists(_.endsWith(".bt2")))
throw new IllegalArgumentException("No bowtie1 index found for tophat")
else if (!new File(bowtie_index).getParentFile.list().toList
.filter(_.startsWith(new File(bowtie_index).getName)).exists(_.endsWith(".ebwt")))
throw new IllegalArgumentException("No bowtie2 index found for tophat")
}
def cmdLine: String = required(executable) +
optional("-o", output_dir) +
conditional(bowtie1, "--bowtie1") +
......
......@@ -47,7 +47,7 @@ class VepNormalizer(val root: Configurable) extends ToolCommandFuntion {
@Output(doc = "Output VCF", shortName = "OutputFile", required = true)
var outputVcf: File = null
var mode: String = config("mode", default = "explode")
var mode: String = config("mode", default = "standard")
var doNotRemove: Boolean = config("donotremove", default = false)
override def defaultCoreMemory = 1.0
......
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