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
95882d8e
Commit
95882d8e
authored
9 years ago
by
Peter van 't Hof
Browse files
Options
Downloads
Patches
Plain Diff
Added more methods to test
parent
53cc2a4d
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/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingleTest.scala
+36
-15
36 additions, 15 deletions
...nl/lumc/sasc/biopet/pipelines/gears/GearsSingleTest.scala
with
36 additions
and
15 deletions
public/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsSingleTest.scala
+
36
−
15
View file @
95882d8e
...
...
@@ -36,7 +36,7 @@ import org.testng.annotations._
* Created by wyleung on 10/22/15.
*/
class
GearsSingleTest
(
val
testset
:
String
)
extends
TestNGSuite
with
Matchers
{
class
GearsSingleTest
extends
TestNGSuite
with
Matchers
{
def
initPipeline
(
map
:
Map
[
String
,
Any
])
:
GearsSingle
=
{
new
GearsSingle
{
override
def
configName
=
"gears"
...
...
@@ -50,22 +50,33 @@ class GearsSingleTest(val testset: String) extends TestNGSuite with Matchers {
@DataProvider
(
name
=
"gearsOptions"
)
def
gearsOptions
=
{
val
startFromBam
=
Array
(
true
,
false
)
val
paired
=
Array
(
true
,
false
)
val
hasOutputNames
=
Array
(
true
,
false
)
val
hasFileExtensions
=
Array
(
true
,
false
)
val
bool
=
Array
(
true
,
false
)
for
(
fromBam
<-
startFromBam
;
pair
<-
paired
;
hasOutputName
<-
hasOutputNames
)
yield
Array
(
testset
,
fromBam
,
pair
,
hasOutputName
)
fromBam
<-
bool
;
pair
<-
bool
;
hasOutputName
<-
bool
;
kraken
<-
bool
;
qiimeClosed
<-
bool
;
qiimeRtax
<-
bool
;
seqCount
<-
bool
)
yield
Array
(
""
,
fromBam
,
pair
,
hasOutputName
,
kraken
,
qiimeClosed
,
qiimeRtax
,
seqCount
)
}
@Test
(
dataProvider
=
"gearsOptions"
)
def
testGears
(
testset
:
String
,
fromBam
:
Boolean
,
paired
:
Boolean
,
hasOutputName
:
Boolean
)
=
{
def
testGears
(
dummy
:
String
,
fromBam
:
Boolean
,
paired
:
Boolean
,
hasOutputName
:
Boolean
,
kraken
:
Boolean
,
qiimeClosed
:
Boolean
,
qiimeRtax
:
Boolean
,
seqCount
:
Boolean
)
=
{
val
map
=
ConfigUtils
.
mergeMaps
(
Map
(
"gears_use_kraken"
->
kraken
,
"gear_use_qiime_rtax"
->
qiimeRtax
,
"gear_use_qiime_closed"
->
qiimeClosed
,
"gear_use_seq_count"
->
seqCount
,
"output_dir"
->
GearsSingleTest
.
outputDir
),
Map
(
GearsSingleTest
.
executables
.
toSeq
:
_
*
))
...
...
@@ -93,9 +104,9 @@ class GearsSingleTest(val testset: String) extends TestNGSuite with Matchers {
gears
.
functions
.
count
(
_
.
isInstanceOf
[
SamtoolsView
])
shouldBe
(
if
(
fromBam
)
1
else
0
)
gears
.
functions
.
count
(
_
.
isInstanceOf
[
SamToFastq
])
shouldBe
(
if
(
fromBam
)
1
else
0
)
gears
.
functions
.
count
(
_
.
isInstanceOf
[
Kraken
])
shouldBe
1
gears
.
functions
.
count
(
_
.
isInstanceOf
[
KrakenReport
])
shouldBe
1
gears
.
functions
.
count
(
_
.
isInstanceOf
[
KrakenReportToJson
])
shouldBe
1
gears
.
functions
.
count
(
_
.
isInstanceOf
[
Kraken
])
shouldBe
(
if
(
kraken
)
1
else
0
)
gears
.
functions
.
count
(
_
.
isInstanceOf
[
KrakenReport
])
shouldBe
(
if
(
kraken
)
1
else
0
)
gears
.
functions
.
count
(
_
.
isInstanceOf
[
KrakenReportToJson
])
shouldBe
(
if
(
kraken
)
1
else
0
)
}
// remove temporary run directory all tests in the class have been run
...
...
@@ -120,6 +131,16 @@ object GearsSingleTest {
"krakenreport"
->
Map
(
"exe"
->
"test"
,
"db"
->
"test"
),
"sambamba"
->
Map
(
"exe"
->
"test"
),
"samtools"
->
Map
(
"exe"
->
"test"
),
"md5sum"
->
Map
(
"exe"
->
"test"
)
"md5sum"
->
Map
(
"exe"
->
"test"
),
"assigntaxonomy"
->
Map
(
"exe"
->
"test"
),
"pickclosedreferenceotus"
->
Map
(
"exe"
->
"test"
),
"pickotus"
->
Map
(
"exe"
->
"test"
),
"pickrepset"
->
Map
(
"exe"
->
"test"
),
"splitlibrariesfastq"
->
Map
(
"exe"
->
"test"
),
"flash"
->
Map
(
"exe"
->
"test"
),
"fastqc"
->
Map
(
"exe"
->
"test"
),
"seqtk"
->
Map
(
"exe"
->
"test"
),
"sickle"
->
Map
(
"exe"
->
"test"
),
"cutadapt"
->
Map
(
"exe"
->
"test"
)
)
}
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