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