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

Spelling error

parent 2f47af7e
......@@ -7,7 +7,7 @@ import java.io.File
import nl.lumc.sasc.biopet.core.apps.{BedToInterval, BiopetFlagstat}
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.function.bedtools.{BedtoolsCoverage, BedtoolsIntersect}
import nl.lumc.sasc.biopet.function.picard.{CollectInsertSizeMetrics, CollectGcBiasMetrics, CalculateHsMetrics}
import nl.lumc.sasc.biopet.function.picard.{CollectInsertSizeMetrics, CollectGcBiasMetrics, CalculateHsMetrics, CollectAlignmentSummaryMetrics}
import nl.lumc.sasc.biopet.function.samtools.SamtoolsFlagstat
class BamMetrics(val root:Configurable) extends QScript with BiopetQScript {
......@@ -36,6 +36,7 @@ class BamMetrics(val root:Configurable) extends QScript with BiopetQScript {
add(BiopetFlagstat(this, inputBam, outputDir))
add(CollectGcBiasMetrics(this, inputBam, outputDir))
add(CollectInsertSizeMetrics(this, inputBam, outputDir))
add(CollectAlignmentSummaryMetrics(this, inputBam, outputDir))
val baitIntervalFile = if (baitBedFile != null) new File(outputDir, baitBedFile.getName.stripSuffix(".bed") + ".interval") else null
if (baitIntervalFile != null)
......
......@@ -22,8 +22,8 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
var vmem: String = _
val defaultVmem: String = ""
@Argument(doc="Executeble")
var executeble: String = _
@Argument(doc="Executable")
var executable: String = _
protected def beforeCmd {
}
......@@ -32,7 +32,7 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
}
override def freezeFieldValues() {
checkExecuteble
checkExecutable
afterGraph
jobOutputFile = new File(firstOutput.getParent + "/." + firstOutput.getName + "." + analysisName + ".out")
......@@ -49,26 +49,26 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
super.freezeFieldValues()
}
protected def checkExecuteble {
try if (executeble != null) {
protected def checkExecutable {
try if (executable != null) {
val buffer = new StringBuffer()
val cmd = Seq("which", executeble)
val cmd = Seq("which", executable)
val process = Process(cmd).run(ProcessLogger(buffer.append(_)))
if (process.exitValue == 0) {
executeble = buffer.toString
val file = new File(executeble)
executeble = file.getCanonicalPath
executable = buffer.toString
val file = new File(executable)
executable = file.getCanonicalPath
} else {
logger.error("executeble: '" + executeble + "' not found, please check config")
throw new QException("executeble: '" + executeble + "' not found, please check config")
logger.error("executable: '" + executable + "' not found, please check config")
throw new QException("executable: '" + executable + "' not found, please check config")
}
} catch {
case ioe: java.io.IOException => logger.warn("Could not use 'which', check on executeble skipped: " + ioe)
case ioe: java.io.IOException => logger.warn("Could not use 'which', check on executable skipped: " + ioe)
}
}
final protected def preCmdInternal {
checkExecuteble
checkExecutable
//for (input <- this.inputs) if (!input.exists) throw new IllegalStateException("Input: " + input + " for " + analysisName + " is missing")
//logger.debug("Config for " + analysisName + ": " + localConfig)
......@@ -96,7 +96,7 @@ trait BiopetCommandLineFunctionTrait extends CommandLineFunction with Configurab
case _ =>
}
}
logger.warn("Version command: '" + versionCommand + "' give a exit code " + process.exitValue + " but no version was found, executeble oke?")
logger.warn("Version command: '" + versionCommand + "' give a exit code " + process.exitValue + " but no version was found, executable oke?")
return "N/A"
}
......
......@@ -3,12 +3,12 @@ package nl.lumc.sasc.biopet.core
import org.broadinstitute.gatk.queue.function.JavaCommandLineFunction
abstract class BiopetJavaCommandLineFunction extends JavaCommandLineFunction with BiopetCommandLineFunctionTrait {
executeble = "java"
executable = "java"
override def commandLine: String = {
preCmdInternal
val cmd = super.commandLine
val finalCmd = executeble + cmd.substring(cmd.indexOf(" "))
val finalCmd = executable + cmd.substring(cmd.indexOf(" "))
// addJobReportBinding("command", cmd)
return cmd
}
......
......@@ -12,9 +12,9 @@ class Cat(val root:Configurable) extends BiopetCommandLineFunction {
@Output(doc="Unzipped file", required=true)
var output: File = _
executeble = config("exe", "cat")
executable = config("exe", "cat")
def cmdLine = required(executeble) + repeat(input) + " > " + required(output)
def cmdLine = required(executable) + repeat(input) + " > " + required(output)
}
object Cat {
......
......@@ -13,7 +13,7 @@ class Pbzip2(val root:Configurable) extends BiopetCommandLineFunction {
@Output(doc="Unzipped file")
var output: File = _
executeble = config("exe", "pbzip2")
executable = config("exe", "pbzip2")
var decomrpess = true
var memory: Int = config("memory", 1000)
......@@ -25,7 +25,7 @@ class Pbzip2(val root:Configurable) extends BiopetCommandLineFunction {
memory = memory * threads
}
def cmdLine = required(executeble) +
def cmdLine = required(executable) +
conditional(decomrpess, "-d") +
conditional(!decomrpess, "-z") +
optional("-p", threads, spaceSeparated=false) +
......
......@@ -10,7 +10,7 @@ trait PythonCommandLineFunction extends BiopetCommandLineFunction {
@Input(doc="Python script", required=false)
var python_script: File = _
executeble = config("python_exe", "python")
executable = config("python_exe", "python")
protected var python_script_name : String = _
def setPythonScript(script:String) { setPythonScript(script,"") }
......@@ -25,6 +25,6 @@ trait PythonCommandLineFunction extends BiopetCommandLineFunction {
}
def getPythonCommand() : String = {
required(executeble) + required(python_script)
required(executable) + required(python_script)
}
}
......@@ -12,7 +12,7 @@ class Sha1sum(val root:Configurable) extends BiopetCommandLineFunction {
@Output(doc="Unzipped file")
var output: File = _
executeble = config("exe","sha1sum")
executable = config("exe","sha1sum")
def cmdLine = required(executeble) + required(input) + " > " + required(output)
def cmdLine = required(executable) + required(input) + " > " + required(output)
}
\ No newline at end of file
......@@ -12,9 +12,9 @@ class Zcat(val root:Configurable) extends BiopetCommandLineFunction {
@Output(doc="Unzipped file")
var output: File = _
executeble = config("exe", "zcat")
executable = config("exe", "zcat")
def cmdLine = required(executeble) + required(input) + " > " + required(output)
def cmdLine = required(executable) + required(input) + " > " + required(output)
}
object Zcat {
......
......@@ -3,7 +3,7 @@ package nl.lumc.sasc.biopet.function.bedtools
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
abstract class Bedtools extends BiopetCommandLineFunction {
executeble = config("exe", "bedtools", "bedtools")
override def versionCommand = executeble + " --version"
executable = config("exe", "bedtools", "bedtools")
override def versionCommand = executable + " --version"
override val versionRegex = """bedtools (.*)""".r
}
\ No newline at end of file
......@@ -23,7 +23,7 @@ class BedtoolsCoverage(val root:Configurable) extends Bedtools {
if (input.getName.endsWith(".bam")) inputTag = "-abam"
}
def cmdLine = required(executeble) + required("coverage") +
def cmdLine = required(executable) + required("coverage") +
required(inputTag, input) +
required("-b", intersectFile) +
conditional(depth, "-d") +
......
......@@ -26,7 +26,7 @@ class BedtoolsIntersect(val root:Configurable) extends Bedtools {
if (input.getName.endsWith(".bam")) inputTag = "-abam"
}
def cmdLine = required(executeble) + required("intersect") +
def cmdLine = required(executable) + required("intersect") +
required(inputTag, input) +
required("-b", intersectFile) +
required("-f", minOverlap) +
......
......@@ -25,7 +25,7 @@ trait Picard extends BiopetJavaCommandLineFunction {
@Argument(doc="CREATE_MD5_FILE", required = false)
var createMd5: Boolean = config("createmd5", false, "picard")
override def versionCommand = executeble + " " + javaOpts + " " + javaExecutable + " -h"
override def versionCommand = executable + " " + javaOpts + " " + javaExecutable + " -h"
override val versionRegex = """Version: (.*)""".r
override val versionExitcode = List(0,1)
......
......@@ -3,8 +3,8 @@ package nl.lumc.sasc.biopet.function.samtools
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
abstract class Samtools extends BiopetCommandLineFunction {
executeble = config("exe", "samtools", "samtools")
override def versionCommand = executeble
executable = config("exe", "samtools", "samtools")
override def versionCommand = executable
override val versionRegex = """Version: (.*)""".r
override val versionExitcode = List(0,1)
}
\ No newline at end of file
......@@ -11,7 +11,7 @@ class SamtoolsFlagstat(val root:Configurable) extends Samtools {
@Output(doc="output File")
var output: File = _
def cmdLine = required(executeble) + required("flagstat") + required(input) + " > " + required(output)
def cmdLine = required(executable) + required("flagstat") + required(input) + " > " + required(output)
}
object SamtoolsFlagstat {
......
......@@ -17,8 +17,8 @@ class Cutadapt(val root:Configurable) extends BiopetCommandLineFunction {
@Output(doc="Output fastq file")
var fastq_output: File = _
executeble = config("exe","cutadapt")
override def versionCommand = executeble + " --version"
executable = config("exe","cutadapt")
override def versionCommand = executable + " --version"
override val versionRegex = """(.*)""".r
var default_clip_mode:String = config("default_clip_mode", "3")
......@@ -37,7 +37,7 @@ class Cutadapt(val root:Configurable) extends BiopetCommandLineFunction {
def cmdLine = {
if (!opt_adapter.isEmpty || !opt_anywhere.isEmpty || !opt_front.isEmpty) {
analysisName = getClass.getName
required(executeble) +
required(executable) +
// options
repeat("-a", opt_adapter) +
repeat("-b", opt_anywhere) +
......
......@@ -17,7 +17,7 @@ class Fastqc(val root:Configurable) extends BiopetCommandLineFunction {
@Output(doc="Output", shortName="out")
var output: File = _
executeble = config("exe","fastqc")
executable = config("exe","fastqc")
var java_exe: String = config("exe", "java", "java")
var kmers: Int = config("kmers", 5)
var quiet: Boolean = config("quiet", false)
......@@ -28,15 +28,15 @@ class Fastqc(val root:Configurable) extends BiopetCommandLineFunction {
override val defaultThreads = 4
override def afterGraph {
this.checkExecuteble
val fastqcDir = executeble.substring(0, executeble.lastIndexOf("/"))
this.checkExecutable
val fastqcDir = executable.substring(0, executable.lastIndexOf("/"))
if (contaminants == null) contaminants = new File(fastqcDir + "/Contaminants/contaminant_list.txt")
}
override def versionCommand = executeble + " --version"
override def versionCommand = executable + " --version"
def cmdLine = {
required(executeble) +
required(executable) +
optional("--java", java_exe) +
optional("--threads",threads) +
optional("--contaminants",contaminants) +
......
......@@ -29,7 +29,7 @@ class Sickle(val root:Configurable) extends BiopetCommandLineFunction {
@Output(doc="stats output")
var output_stats: File = null
executeble = config("exe", "sickle")
executable = config("exe", "sickle")
var qualityType: String = config("qualitytype", null)
var defaultQualityType: String = _
......@@ -40,14 +40,14 @@ class Sickle(val root:Configurable) extends BiopetCommandLineFunction {
if (qualityType == null && defaultQualityType != null) qualityType = defaultQualityType
}
override def versionCommand = executeble + " --version"
override def versionCommand = executable + " --version"
override def beforeCmd {
qualityType = getQualityTypeFromFile
}
def cmdLine = {
var cmd: String = required(executeble)
var cmd: String = required(executable)
if (input_R2 != null) {
cmd += required("pe") +
required("-r", input_R2) +
......
......@@ -22,17 +22,17 @@ class Bwa(val root:Configurable) extends BiopetCommandLineFunction {
var RG: String = _
var M: Boolean = config("M", true)
executeble = config("exe", "bwa")
executable = config("exe", "bwa")
override val versionRegex = """Version: (.*)""".r
override val versionExitcode = List(0,1)
override val defaultVmem = "6G"
override val defaultThreads = 8
override def versionCommand = executeble
override def versionCommand = executable
def cmdLine = {
required(executeble) +
required(executable) +
required("mem") +
optional("-t", nCoresRequest) +
optional("-R", RG) +
......
......@@ -34,7 +34,7 @@ class Star(val root:Configurable) extends BiopetCommandLineFunction {
@Output(doc="Output SAindex file", required=false)
var outputSAindex: File = _
executeble = config("exe", "STAR")
executable = config("exe", "STAR")
@Argument(doc="Output Directory")
var outputDir: String = _
......@@ -64,7 +64,7 @@ class Star(val root:Configurable) extends BiopetCommandLineFunction {
}
def cmdLine : String = {
var cmd: String = required("cd",outputDir) + "&&" + required(executeble)
var cmd: String = required("cd",outputDir) + "&&" + required(executable)
if (runmode != null && runmode == "genomeGenerate") { // Create index
cmd += required("--runMode", runmode) +
required("--genomeFastaFiles", referenceFile)
......
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