Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
biopet.biopet
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
biopet.biopet
Commits
df13ef90
Commit
df13ef90
authored
8 years ago
by
Sander Bollen
Browse files
Options
Downloads
Patches
Plain Diff
extra tests for toucan
parent
48781f54
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/toucan/src/test/scala/nl/lumc/sasc/biopet/pipelines/toucan/ToucanTest.scala
+29
-3
29 additions, 3 deletions
...ala/nl/lumc/sasc/biopet/pipelines/toucan/ToucanTest.scala
with
29 additions
and
3 deletions
public/toucan/src/test/scala/nl/lumc/sasc/biopet/pipelines/toucan/ToucanTest.scala
+
29
−
3
View file @
df13ef90
package
nl.lumc.sasc.biopet.pipelines.toucan
import
java.io.File
import
java.nio.file.
{
Files
,
Paths
}
import
java.nio.file.
{
Files
,
Paths
}
import
nl.lumc.sasc.biopet.extensions.VariantEffectPredictor
import
nl.lumc.sasc.biopet.extensions.bcftools.BcftoolsView
import
nl.lumc.sasc.biopet.extensions.manwe.
{
ManweAnnotateVcf
,
ManweSamplesImport
}
import
nl.lumc.sasc.biopet.extensions.tools.
{
GvcfToBed
,
VepNormalizer
}
import
nl.lumc.sasc.biopet.utils.config.Config
import
org.broadinstitute.gatk.queue.QSettings
import
org.scalatest.Matchers
...
...
@@ -16,7 +20,7 @@ class ToucanTest extends TestNGSuite with Matchers {
val
faultyToucan
=
new
Toucan
(
null
)
{
override
def
sampleInfo
:
Map
[
String
,
Map
[
String
,
Any
]]
=
Map
(
"sample1"
->
Map
(
"varda_group
s
"
->
List
(
"group1"
,
"group2"
))
"sample1"
->
Map
(
"varda_group"
->
List
(
"group1"
,
"group2"
))
)
override
def
globalConfig
=
new
Config
(
Map
(
...
...
@@ -41,7 +45,7 @@ class ToucanTest extends TestNGSuite with Matchers {
val
correctToucan
=
new
Toucan
(
null
)
{
override
def
sampleInfo
:
Map
[
String
,
Map
[
String
,
Any
]]
=
Map
(
"sample1"
->
Map
(
"varda_group
s
"
->
List
(
"group1"
,
"group2"
))
"sample1"
->
Map
(
"varda_group"
->
List
(
"group1"
,
"group2"
))
)
override
def
globalConfig
=
new
Config
(
Map
(
...
...
@@ -65,4 +69,26 @@ class ToucanTest extends TestNGSuite with Matchers {
def
testCompletePipeline
()
=
{
noException
should
be
thrownBy
correctToucan
.
script
()
}
@Test
def
testExpectedFunctions
()
=
{
correctToucan
.
functions
.
count
(
_
.
isInstanceOf
[
VariantEffectPredictor
])
shouldBe
1
correctToucan
.
functions
.
count
(
_
.
isInstanceOf
[
VepNormalizer
])
shouldBe
1
correctToucan
.
functions
.
count
(
_
.
isInstanceOf
[
ManweSamplesImport
])
shouldBe
1
correctToucan
.
functions
.
count
(
_
.
isInstanceOf
[
ManweActivateAfterAnnotImport
])
shouldBe
1
correctToucan
.
functions
.
count
(
_
.
isInstanceOf
[
ManweDownloadAfterAnnotate
])
shouldBe
1
correctToucan
.
functions
.
count
(
_
.
isInstanceOf
[
ManweAnnotateVcf
])
shouldBe
1
correctToucan
.
functions
.
count
(
_
.
isInstanceOf
[
GvcfToBed
])
shouldBe
1
correctToucan
.
functions
.
count
(
_
.
isInstanceOf
[
BcftoolsView
])
shouldBe
1
}
@Test
def
testSamples
()
=
{
correctToucan
.
functions
.
filter
(
_
.
isInstanceOf
[
ManweSamplesImport
]).
map
(
x
=>
x
.
asInstanceOf
[
ManweSamplesImport
]).
foreach
(
x
=>
x
.
group
shouldBe
List
(
"group1"
,
"group2"
))
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment