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
fc3c33c0
Commit
fc3c33c0
authored
May 15, 2016
by
Peter van 't Hof
Browse files
Added amplicon test
parent
7fceac90
Changes
1
Hide whitespace changes
Inline
Side-by-side
shiva/src/test/scala/nl/lumc/sasc/biopet/pipelines/shiva/ShivaVariantcallingTest.scala
View file @
fc3c33c0
...
...
@@ -49,6 +49,8 @@ trait ShivaVariantcallingTestTrait extends TestNGSuite with Matchers {
def
freebayes
:
Boolean
=
false
def
varscanCnsSinglesample
:
Boolean
=
false
def
referenceVcf
:
Option
[
File
]
=
None
def
roiBedFiles
:
List
[
File
]
=
Nil
def
ampliconBedFile
:
Option
[
File
]
=
None
def
normalize
=
false
def
decompose
=
false
...
...
@@ -87,8 +89,9 @@ trait ShivaVariantcallingTestTrait extends TestNGSuite with Matchers {
val
map
=
Map
(
"variantcallers"
->
callers
.
toList
,
"execute_vt_normalize"
->
normalize
,
"execute_vt_decompose"
->
decompose
)
++
referenceVcf
.
map
(
"reference_vcf"
->
_
)
"execute_vt_decompose"
->
decompose
,
"regions_of_interest"
->
roiBedFiles
.
map
(
_
.
getAbsolutePath
)
)
++
referenceVcf
.
map
(
"reference_vcf"
->
_
)
++
ampliconBedFile
.
map
(
"amplicon_bed"
->
_
.
getAbsolutePath
)
val
pipeline
=
initPipeline
(
map
)
pipeline
.
inputBams
=
(
for
(
n
<-
1
to
bams
)
yield
n
.
toString
->
ShivaVariantcallingTest
.
inputTouch
(
"bam_"
+
n
+
".bam"
)).
toMap
...
...
@@ -114,7 +117,7 @@ trait ShivaVariantcallingTestTrait extends TestNGSuite with Matchers {
(
if
(
haplotypeCallerAllele
)
1
else
0
)
+
(
if
(
haplotypeCallerGvcf
)
bams
else
0
)
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
UnifiedGenotyper
])
shouldBe
(
if
(
unifiedGenotyper
)
1
else
0
)
+
(
if
(
unifiedGenotyperAllele
)
1
else
0
)
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
VcfStats
])
shouldBe
(
1
+
callers
.
size
)
pipeline
.
functions
.
count
(
_
.
isInstanceOf
[
VcfStats
])
shouldBe
(
1
+
callers
.
size
+
(
roiBedFiles
++
ampliconBedFile
).
length
)
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
)
...
...
@@ -178,10 +181,14 @@ class ShivaVariantcallingNormalizeDecomposeTest extends ShivaVariantcallingTestT
override
def
normalize
=
true
override
def
decompose
=
true
}
class
ShivaVariantcalling
U
ReferenceVcfTest
extends
ShivaVariantcallingTestTrait
{
class
ShivaVariantcallingReferenceVcfTest
extends
ShivaVariantcallingTestTrait
{
override
def
unifiedGenotyper
:
Boolean
=
true
override
def
referenceVcf
=
Some
(
new
File
(
"ref.vcf"
))
}
class
ShivaVariantcallingAmpliconTest
extends
ShivaVariantcallingTestTrait
{
override
def
unifiedGenotyper
:
Boolean
=
true
override
def
ampliconBedFile
=
Some
(
new
File
(
"amplicon.bed"
))
}
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