Commit 51f0b19d authored by Peter van 't Hof's avatar Peter van 't Hof

Fixing code warnings

parent 6fc498a4
...@@ -40,10 +40,10 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu ...@@ -40,10 +40,10 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu
var vepScript: String = config("vep_script") var vepScript: String = config("vep_script")
@Input(doc = "input VCF", required = true) @Input(doc = "input VCF", required = true)
var input: File = null var input: File = _
@Output(doc = "output file", required = true) @Output(doc = "output file", required = true)
var output: File = null var output: File = _
override def subPath = { override def subPath = {
if (vepVersion.isSet) super.subPath ++ List("vep_settings") ++ vepVersion() if (vepVersion.isSet) super.subPath ++ List("vep_settings") ++ vepVersion()
...@@ -160,7 +160,7 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu ...@@ -160,7 +160,7 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu
override def defaultCoreMemory = 4.0 override def defaultCoreMemory = 4.0
@Output @Output
private var _summary: File = null private var _summary: File = _
override def beforeGraph(): Unit = { override def beforeGraph(): Unit = {
super.beforeGraph() super.beforeGraph()
...@@ -312,11 +312,11 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu ...@@ -312,11 +312,11 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu
(for ((header, headerIndex) <- headers) yield { (for ((header, headerIndex) <- headers) yield {
val name = header.stripPrefix("[").stripSuffix("]") val name = header.stripPrefix("[").stripSuffix("]")
name.replaceAll(" ", "_") -> (contents.drop(headerIndex + 1).takeWhile(!isHeader(_)).flatMap { line => name.replaceAll(" ", "_") -> contents.drop(headerIndex + 1).takeWhile(!isHeader(_)).flatMap { line =>
val values = line.split("\t", 2) val values = line.split("\t", 2)
if (values.last.isEmpty || values.last == "-") None if (values.last.isEmpty || values.last == "-") None
else Some(values.head.replaceAll(" ", "_") -> tryToParseNumber(values.last).getOrElse(values.last)) else Some(values.head.replaceAll(" ", "_") -> tryToParseNumber(values.last).getOrElse(values.last))
}.toMap) }.toMap
}).toMap }).toMap
} }
} }
...@@ -6,6 +6,7 @@ import org.testng.annotations.Test ...@@ -6,6 +6,7 @@ import org.testng.annotations.Test
/** /**
* Created by Sander Bollen on 12-10-16. * Created by Sander Bollen on 12-10-16.
* Here we test utils
*/ */
class UtilsTest extends TestNGSuite with Matchers { class UtilsTest extends TestNGSuite with Matchers {
......
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