Commit eb9c02c0 authored by bow's avatar bow
Browse files

Fix for NullPointer exception error in #156

parent 2efc1a6d
......@@ -30,6 +30,8 @@ import nl.lumc.sasc.biopet.extensions.varscan.Mpileup2cns
// Better to do everything quick and dirty here rather than something half-implemented with the objects
class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction { wrapper =>
override def configName = "customvarscan"
@Input(doc = "Input BAM file", required = true)
var input: File = null
......@@ -45,6 +47,7 @@ class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction {
// mpileup, varscan, fix_mpileup.py, binom_test.py, bgzip, tabix
private def mpileup = new SamtoolsMpileup(wrapper.root) {
this.input = List(wrapper.input)
override def configName = wrapper.configName
disableBaq = true
reference = config("reference")
depth = Option(1000000)
......@@ -54,16 +57,19 @@ class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction {
private def fixMpileup = new PythonCommandLineFunction {
setPythonScript("fix_mpileup.py", "/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/")
override val root: Configurable = wrapper.root
override def configName = wrapper.configName
def cmdLine = getPythonCommand
}
private def removeEmptyPile = new BiopetCommandLineFunction {
override val root: Configurable = wrapper.root
override def configName = wrapper.configName
executable = config("exe", default = "grep", freeVar = false)
override def cmdLine: String = required(executable) + required("-vP") + required("""\t\t""")
}
private val varscan = new Mpileup2cns(wrapper.root) {
override def configName = wrapper.configName
strandFilter = Option(0)
outputVcf = Option(1)
}
......@@ -71,6 +77,7 @@ class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction {
private val compress = new Bgzip(wrapper.root)
private val index = new Tabix(wrapper.root) {
override def configName = wrapper.configName
p = Option("vcf")
}
......
......@@ -29,6 +29,8 @@ import nl.lumc.sasc.biopet.core.config.Configurable
// Better to do everything quick and dirty here rather than something half-implemented with the objects
class RawBaseCounter(val root: Configurable) extends BiopetCommandLineFunction { wrapper =>
override def configName = "rawbasecounter"
@Input(doc = "Reference BED file", required = true)
var annotationBed: File = null
......@@ -53,6 +55,7 @@ class RawBaseCounter(val root: Configurable) extends BiopetCommandLineFunction {
private def grepForStrand = new BiopetCommandLineFunction {
var strand: String = null
override val root: Configurable = wrapper.root
override def configName = wrapper.configName
executable = config("exe", default = "grep", freeVar = false)
override def cmdLine: String = required(executable) +
required("-P", """\""" + strand + """$""") +
......@@ -61,7 +64,7 @@ class RawBaseCounter(val root: Configurable) extends BiopetCommandLineFunction {
private def bedtoolsCovHist = new BiopetCommandLineFunction {
var bam: File = null
override val configName = "bedtoolscoverage"
override def configName = "bedtoolscoverage"
override val root: Configurable = wrapper.root
executable = config("exe", default = "coverageBed", freeVar = false)
override def cmdLine: String = required(executable) +
......@@ -73,6 +76,7 @@ class RawBaseCounter(val root: Configurable) extends BiopetCommandLineFunction {
private def hist2Count = new PythonCommandLineFunction {
setPythonScript("hist2count.py", "/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/")
override def configName = wrapper.configName
override val root: Configurable = wrapper.root
def cmdLine = getPythonCommand + optional("-c", "3")
}
......
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