Commit 278c4384 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Style changes

parent 2738a59f
......@@ -264,17 +264,16 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu
def summaryFiles: Map[String, File] = Map()
def summaryStats: Map[String, Any] = {
if (statsText) {
val statsFile: File = new File(output.getAbsolutePath + "_summary.txt")
parseStatsFile(statsFile)
} else {
Map()
}
if (statsText) parseStatsFile(new File(output.getAbsolutePath + "_summary.txt"))
else Map()
}
def parseStatsFile(file: File): Map[String, Any] = {
val contents = Source.fromFile(file).getLines().toList
val headers = getHeadersFromStatsFile(contents)
val headers = contents
.filter(x => x.startsWith("[") && x.endsWith("]"))
.map(_.stripPrefix("[").stripSuffix("]"))
headers.foldLeft(Map.empty[String, Any])((acc, x) => acc + (x.replace(" ", "_") -> getBlockFromStatsFile(contents, x)))
}
......
......@@ -19,7 +19,7 @@ import java.io.File
import org.scalatest.Matchers
import org.scalatest.testng.TestNGSuite
import org.testng.annotations.{DataProvider, Test}
import org.testng.annotations.{ DataProvider, Test }
/**
* Created by ahbbollen on 2-3-16.
......
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