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
1b58a105
Commit
1b58a105
authored
Mar 03, 2016
by
Peter van 't Hof
Browse files
Added function dataprovider
parent
8a1b23a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/biopet-tools-extensions/src/test/scala/VcfFilterTest.scala
View file @
1b58a105
...
...
@@ -187,4 +187,64 @@ class VcfFilterTest extends TestNGSuite with Matchers {
filterer
.
outputVcfIndex
.
getAbsolutePath
shouldBe
oVcf
.
getAbsolutePath
+
".tbi"
}
@DataProvider
(
name
=
"functions"
)
def
functions
=
{
Array
(
()
=>
testCommand
(
minSampleDepth
=
Some
(
2
)),
()
=>
testCommand
(
minTotalDepth
=
Some
(
2
)),
()
=>
testCommand
(
minSampleDepth
=
Some
(
2
),
minTotalDepth
=
Some
(
2
))
).
map
(
Array
(
_
))
}
@Test
(
dataProvider
=
"functions"
)
def
executer
(
function0
:
Function0
[
Unit
])
:
Unit
=
function0
()
protected
def
testCommand
(
minSampleDepth
:
Option
[
Int
]
=
None
,
minTotalDepth
:
Option
[
Int
]
=
None
,
minAlternateDepth
:
Option
[
Int
]
=
None
,
minSamplesPass
:
Option
[
Int
]
=
None
,
minGenomeQuality
:
Option
[
Int
]
=
None
,
filterRefCalls
:
Boolean
=
false
,
invertedOutputVcf
:
Option
[
File
]
=
None
,
resToDom
:
Option
[
String
]
=
None
,
trioCompound
:
Option
[
String
]
=
None
,
deNovoInSample
:
Option
[
String
]
=
None
,
deNovoTrio
:
Option
[
String
]
=
None
,
trioLossOfHet
:
Option
[
String
]
=
None
,
mustHaveVariant
:
List
[
String
]
=
Nil
,
calledIn
:
List
[
String
]
=
Nil
,
mustHaveGenotype
:
List
[
String
]
=
Nil
,
diffGenotype
:
List
[
String
]
=
Nil
,
filterHetVarToHomVar
:
List
[
String
]
=
Nil
,
minQualScore
:
Option
[
Double
]
=
None
,
id
:
List
[
String
]
=
Nil
,
idFile
:
Option
[
File
]
=
None
)
:
Unit
=
{
val
vcfFilter
=
new
VcfFilter
(
null
)
vcfFilter
.
minSampleDepth
=
minSampleDepth
vcfFilter
.
minTotalDepth
=
minTotalDepth
vcfFilter
.
minAlternateDepth
=
minAlternateDepth
vcfFilter
.
minSamplesPass
=
minSamplesPass
vcfFilter
.
minGenomeQuality
=
minGenomeQuality
vcfFilter
.
filterRefCalls
=
filterRefCalls
vcfFilter
.
invertedOutputVcf
=
invertedOutputVcf
vcfFilter
.
resToDom
=
resToDom
vcfFilter
.
trioCompound
=
trioCompound
vcfFilter
.
deNovoInSample
=
deNovoInSample
vcfFilter
.
deNovoTrio
=
deNovoTrio
vcfFilter
.
trioLossOfHet
=
trioLossOfHet
vcfFilter
.
mustHaveVariant
=
mustHaveVariant
vcfFilter
.
calledIn
=
calledIn
vcfFilter
.
mustHaveGenotype
=
mustHaveGenotype
vcfFilter
.
diffGenotype
=
diffGenotype
vcfFilter
.
filterHetVarToHomVar
=
filterHetVarToHomVar
vcfFilter
.
minQualScore
=
minQualScore
vcfFilter
.
id
=
id
vcfFilter
.
idFile
=
idFile
val
command
=
vcfFilter
.
commandLine
//TODO: add test on command test
}
}
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