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
17c6f86b
Commit
17c6f86b
authored
10 years ago
by
Peter van 't Hof
Browse files
Options
Downloads
Patches
Plain Diff
Added even more unit tests, now 1408 for gatk pipeline, sadly no 1337
parent
14d93e73
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
protected/biopet-gatk-pipelines/src/test/scala/nl/lumc/sasc/biopet/pipelines/gatk/ShivaGatkTest.scala
+14
-9
14 additions, 9 deletions
...la/nl/lumc/sasc/biopet/pipelines/gatk/ShivaGatkTest.scala
with
14 additions
and
9 deletions
protected/biopet-gatk-pipelines/src/test/scala/nl/lumc/sasc/biopet/pipelines/gatk/ShivaGatkTest.scala
+
14
−
9
View file @
17c6f86b
...
...
@@ -3,7 +3,7 @@ package nl.lumc.sasc.biopet.pipelines.gatk
import
com.google.common.io.Files
import
nl.lumc.sasc.biopet.core.config.Config
import
nl.lumc.sasc.biopet.extensions.bwa.BwaMem
import
nl.lumc.sasc.biopet.extensions.gatk.broad.
{
PrintReads
,
BaseRecalibrator
,
RealignerTargetCreator
,
IndelRealigner
}
import
nl.lumc.sasc.biopet.extensions.gatk.broad.
_
import
nl.lumc.sasc.biopet.extensions.picard.
{
MarkDuplicates
,
SortSam
}
import
nl.lumc.sasc.biopet.tools.VcfStats
import
nl.lumc.sasc.biopet.utils.ConfigUtils
...
...
@@ -29,13 +29,16 @@ class ShivaGatkTest extends TestNGSuite with Matchers {
def
shivaOptions
=
{
val
bool
=
Array
(
true
,
false
)
for
(
s1
<-
bool
;
s2
<-
bool
;
s3
<-
bool
;
multi
<-
bool
;
single
<-
bool
;
library
<-
bool
;
dbsnp
<-
bool
)
yield
Array
(
""
,
s1
,
s2
,
s3
,
multi
,
single
,
library
,
dbsnp
)
for
(
s1
<-
bool
;
s2
<-
bool
;
s3
<-
bool
;
multi
<-
bool
;
single
<-
bool
;
library
<-
bool
;
dbsnp
<-
bool
;
covariates
<-
bool
;
realign
<-
bool
;
baseRecalibration
<-
bool
)
yield
Array
(
""
,
s1
,
s2
,
s3
,
multi
,
single
,
library
,
dbsnp
,
covariates
,
realign
,
baseRecalibration
)
}
@Test
(
dataProvider
=
"shivaOptions"
)
def
testShiva
(
f
:
String
,
sample1
:
Boolean
,
sample2
:
Boolean
,
sample3
:
Boolean
,
multi
:
Boolean
,
single
:
Boolean
,
library
:
Boolean
,
dbsnp
:
Boolean
)
:
Unit
=
{
multi
:
Boolean
,
single
:
Boolean
,
library
:
Boolean
,
dbsnp
:
Boolean
,
covariates
:
Boolean
,
realign
:
Boolean
,
baseRecalibration
:
Boolean
)
:
Unit
=
{
val
map
=
{
var
m
:
Map
[
String
,
Any
]
=
ShivaGatkTest
.
config
if
(
sample1
)
m
=
ConfigUtils
.
mergeMaps
(
ShivaGatkTest
.
sample1
,
m
.
toMap
)
...
...
@@ -44,7 +47,8 @@ class ShivaGatkTest extends TestNGSuite with Matchers {
if
(
dbsnp
)
m
=
ConfigUtils
.
mergeMaps
(
Map
(
"dbsnp"
->
"test"
),
m
.
toMap
)
ConfigUtils
.
mergeMaps
(
Map
(
"multisample_sample_variantcalling"
->
multi
,
"single_sample_variantcalling"
->
single
,
"library_variantcalling"
->
library
),
m
.
toMap
)
"library_variantcalling"
->
library
,
"use_analyze_covariates"
->
covariates
,
"use_indel_realign"
->
realign
,
"use_base_recalibration"
->
baseRecalibration
),
m
.
toMap
)
}
...
...
@@ -64,10 +68,11 @@ class ShivaGatkTest extends TestNGSuite with Matchers {
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
MarkDuplicates
])
shouldBe
(
numberLibs
+
(
if
(
sample3
)
1
else
0
))
// Gatk preprocess
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
IndelRealigner
])
shouldBe
(
numberLibs
+
(
if
(
sample3
)
1
else
0
))
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
RealignerTargetCreator
])
shouldBe
(
numberLibs
+
(
if
(
sample3
)
1
else
0
))
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
BaseRecalibrator
])
shouldBe
(
if
(
dbsnp
)
numberLibs
else
0
)
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
PrintReads
])
shouldBe
(
if
(
dbsnp
)
numberLibs
else
0
)
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
IndelRealigner
])
shouldBe
(
numberLibs
+
(
if
(
sample3
)
1
else
0
))
*
(
if
(
realign
)
1
else
0
)
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
RealignerTargetCreator
])
shouldBe
(
numberLibs
+
(
if
(
sample3
)
1
else
0
))
*
(
if
(
realign
)
1
else
0
)
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
BaseRecalibrator
])
shouldBe
(
if
(
dbsnp
&&
baseRecalibration
)
numberLibs
else
0
)
*
(
if
(
covariates
)
2
else
1
)
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
AnalyzeCovariates
])
shouldBe
(
if
(
dbsnp
&&
covariates
&&
baseRecalibration
)
numberLibs
else
0
)
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
PrintReads
])
shouldBe
(
if
(
dbsnp
&&
baseRecalibration
)
numberLibs
else
0
)
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
VcfStats
])
shouldBe
(
if
(
multi
)
2
else
0
)
+
(
if
(
single
)
numberSamples
*
2
else
0
)
+
(
if
(
library
)
numberLibs
*
2
else
0
)
...
...
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