Skip to content
Snippets Groups Projects
Commit eb9c02c0 authored by bow's avatar bow
Browse files

Fix for NullPointer exception error in #156

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