Skip to content
GitLab
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
d0b7d22d
Commit
d0b7d22d
authored
May 13, 2016
by
bow
Browse files
Fix improper list type check in Toucan
parent
5ca76501
Changes
1
Hide whitespace changes
Inline
Side-by-side
toucan/src/main/scala/nl/lumc/sasc/biopet/pipelines/toucan/Toucan.scala
View file @
d0b7d22d
...
...
@@ -30,6 +30,7 @@ import nl.lumc.sasc.biopet.utils.VcfUtils
import
nl.lumc.sasc.biopet.utils.config.Configurable
import
nl.lumc.sasc.biopet.utils.intervals.BedRecordList
import
org.broadinstitute.gatk.queue.QScript
import
scalaz._
,
Scalaz
.
_
/**
* Pipeline to annotate a vcf file with VEP
...
...
@@ -263,11 +264,16 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum
add
(
annotatedVcf
)
val
activates
=
sampleInfo
map
{
x
=>
val
sampleGroup
=
x
.
_2
.
getOrElse
(
"varda_group"
,
Nil
)
match
{
case
x
:
List
[
String
]
=>
x
case
Nil
=>
Nil
case
_
=>
throw
new
IllegalArgumentException
(
"Sample tag 'varda_group' is not a list of strings"
)
val
maybeSampleGroup
=
x
.
_2
.
get
(
"varda_group"
)
match
{
case
None
=>
Some
(
Nil
)
case
Some
(
vals
)
=>
vals
match
{
case
xs
:
List
[
_
]
=>
xs
.
traverse
[
Option
,
String
]
{
x
=>
Option
(
x
.
toString
).
filter
(
_
==
x
)
}
case
otherwise
=>
None
}
}
val
sampleGroup
=
maybeSampleGroup
.
getOrElse
(
throw
new
IllegalArgumentException
(
"Sample tag 'varda_group' is not a list of strings"
))
importAndActivateSample
(
x
.
_1
,
sampleGroup
,
vcf
,
gVcf
,
annotate
)
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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