Skip to content
Snippets Groups Projects
Commit 77d657ac authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Skip empty values

parent e5e47f6c
No related branches found
No related tags found
No related merge requests found
......@@ -301,9 +301,10 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu
(for ((header, headerIndex) <- headers) yield {
val name = header.stripPrefix("[").stripSuffix("]")
name.replaceAll(" ", "_") -> (contents.drop(headerIndex + 1).takeWhile(!isHeader(_)).map { line =>
name.replaceAll(" ", "_") -> (contents.drop(headerIndex + 1).takeWhile(!isHeader(_)).flatMap { line =>
val values = line.split("\t", 2)
values.head.replaceAll(" ", "_") -> tryToParseNumber(values.last).getOrElse(values.last)
if (values.last.isEmpty || values.last == "-") None
else Some(values.head.replaceAll(" ", "_") -> tryToParseNumber(values.last).getOrElse(values.last))
}.toMap)
}).toMap
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment