Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
77d657ac
Commit
77d657ac
authored
Aug 17, 2016
by
Peter van 't Hof
Browse files
Skip empty values
parent
e5e47f6c
Changes
1
Show whitespace changes
Inline
Side-by-side
biopet-extensions/src/main/scala/nl/lumc/sasc/biopet/extensions/VariantEffectPredictor.scala
View file @
77d657ac
...
...
@@ -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
(
_
)).
m
ap
{
line
=>
name
.
replaceAll
(
" "
,
"_"
)
->
(
contents
.
drop
(
headerIndex
+
1
).
takeWhile
(!
isHeader
(
_
)).
flatM
ap
{
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
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment