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
7fceac90
Commit
7fceac90
authored
May 15, 2016
by
Peter van 't Hof
Browse files
Added test for referenceVcf
parent
000e1325
Changes
1
Hide whitespace changes
Inline
Side-by-side
shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcallingTest.scala
View file @
7fceac90
...
...
@@ -11,7 +11,7 @@ import com.google.common.io.Files
import
nl.lumc.sasc.biopet.core.BiopetPipe
import
nl.lumc.sasc.biopet.extensions.Freebayes
import
nl.lumc.sasc.biopet.extensions.bcftools.
{
BcftoolsCall
,
BcftoolsMerge
}
import
nl.lumc.sasc.biopet.extensions.gatk.
{
CombineVariants
,
HaplotypeCaller
,
UnifiedGenotyper
}
import
nl.lumc.sasc.biopet.extensions.gatk.
{
CombineVariants
,
GenotypeConcordance
,
HaplotypeCaller
,
UnifiedGenotyper
}
import
nl.lumc.sasc.biopet.utils.config.Config
import
nl.lumc.sasc.biopet.extensions.tools.
{
MpileupToVcf
,
VcfFilter
,
VcfStats
}
import
nl.lumc.sasc.biopet.extensions.vt.
{
VtDecompose
,
VtNormalize
}
...
...
@@ -48,6 +48,7 @@ trait ShivaVariantcallingTestTrait extends TestNGSuite with Matchers {
def
haplotypeCaller
:
Boolean
=
false
def
freebayes
:
Boolean
=
false
def
varscanCnsSinglesample
:
Boolean
=
false
def
referenceVcf
:
Option
[
File
]
=
None
def
normalize
=
false
def
decompose
=
false
...
...
@@ -87,7 +88,7 @@ trait ShivaVariantcallingTestTrait extends TestNGSuite with Matchers {
"variantcallers"
->
callers
.
toList
,
"execute_vt_normalize"
->
normalize
,
"execute_vt_decompose"
->
decompose
)
)
++
referenceVcf
.
map
(
"reference_vcf"
->
_
)
val
pipeline
=
initPipeline
(
map
)
pipeline
.
inputBams
=
(
for
(
n
<-
1
to
bams
)
yield
n
.
toString
->
ShivaVariantcallingTest
.
inputTouch
(
"bam_"
+
n
+
".bam"
)).
toMap
...
...
@@ -116,6 +117,7 @@ trait ShivaVariantcallingTestTrait extends TestNGSuite with Matchers {
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
VcfStats
])
shouldBe
(
1
+
callers
.
size
)
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
VtNormalize
])
shouldBe
(
if
(
normalize
)
callers
.
size
else
0
)
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
VtDecompose
])
shouldBe
(
if
(
decompose
)
callers
.
size
else
0
)
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
GenotypeConcordance
])
shouldBe
(
if
(
referenceVcf
.
isDefined
)
1
else
0
)
}
}
}
...
...
@@ -176,7 +178,10 @@ class ShivaVariantcallingNormalizeDecomposeTest extends ShivaVariantcallingTestT
override
def
normalize
=
true
override
def
decompose
=
true
}
class
ShivaVariantcallingUReferenceVcfTest
extends
ShivaVariantcallingTestTrait
{
override
def
unifiedGenotyper
:
Boolean
=
true
override
def
referenceVcf
=
Some
(
new
File
(
"ref.vcf"
))
}
object
ShivaVariantcallingTest
{
val
outputDir
=
Files
.
createTempDir
()
...
...
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