Skip to content
GitLab
Menu
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
6b8b3a37
Commit
6b8b3a37
authored
Feb 05, 2016
by
Peter van 't Hof
Browse files
Added testing for kraken to krona method
parent
768f5596
Changes
3
Hide whitespace changes
Inline
Side-by-side
public/gears/src/test/resources/hpv_simu_R1.krkn.json
0 → 100644
View file @
6b8b3a37
{
"unclassified"
:
{
"children"
:
[
],
"name"
:
"unclassified"
,
"count"
:
732
,
"taxid"
:
0
,
"size"
:
732
,
"cladelevel"
:
0
,
"taxonrank"
:
"U"
},
"classified"
:
{
"children"
:
[
{
"children"
:
[
{
"children"
:
[
{
"children"
:
[
{
"children"
:
[
{
"children"
:
[
{
"children"
:
[
{
"children"
:
[
{
"children"
:
[
],
"name"
:
"Human herpesvirus 4 type 2"
,
"count"
:
6
,
"taxid"
:
12509
,
"size"
:
6
,
"cladelevel"
:
8
,
"taxonrank"
:
"-"
}
],
"name"
:
"Human herpesvirus 4"
,
"count"
:
3902
,
"taxid"
:
10376
,
"size"
:
3908
,
"cladelevel"
:
7
,
"taxonrank"
:
"S"
}
],
"name"
:
"Lymphocryptovirus"
,
"count"
:
0
,
"taxid"
:
10375
,
"size"
:
3908
,
"cladelevel"
:
6
,
"taxonrank"
:
"G"
}
],
"name"
:
"Gammaherpesvirinae"
,
"count"
:
0
,
"taxid"
:
10374
,
"size"
:
3908
,
"cladelevel"
:
5
,
"taxonrank"
:
"-"
},
{
"children"
:
[
{
"children"
:
[
{
"children"
:
[
],
"name"
:
"Human herpesvirus 5"
,
"count"
:
5360
,
"taxid"
:
10359
,
"size"
:
5360
,
"cladelevel"
:
7
,
"taxonrank"
:
"S"
}
],
"name"
:
"Cytomegalovirus"
,
"count"
:
0
,
"taxid"
:
10358
,
"size"
:
5360
,
"cladelevel"
:
6
,
"taxonrank"
:
"G"
}
],
"name"
:
"Betaherpesvirinae"
,
"count"
:
0
,
"taxid"
:
10357
,
"size"
:
5360
,
"cladelevel"
:
5
,
"taxonrank"
:
"-"
}
],
"name"
:
"Herpesviridae"
,
"count"
:
0
,
"taxid"
:
10292
,
"size"
:
9268
,
"cladelevel"
:
4
,
"taxonrank"
:
"F"
}
],
"name"
:
"Herpesvirales"
,
"count"
:
0
,
"taxid"
:
548681
,
"size"
:
9268
,
"cladelevel"
:
3
,
"taxonrank"
:
"O"
}
],
"name"
:
"dsDNA viruses, no RNA stage"
,
"count"
:
0
,
"taxid"
:
35237
,
"size"
:
9268
,
"cladelevel"
:
2
,
"taxonrank"
:
"-"
}
],
"name"
:
"Viruses"
,
"count"
:
0
,
"taxid"
:
10239
,
"size"
:
9268
,
"cladelevel"
:
1
,
"taxonrank"
:
"D"
}
],
"name"
:
"root"
,
"count"
:
0
,
"taxid"
:
1
,
"size"
:
9268
,
"cladelevel"
:
0
,
"taxonrank"
:
"-"
}
}
public/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsKrakenTest.scala
0 → 100644
View file @
6b8b3a37
package
nl.lumc.sasc.biopet.pipelines.gears
import
java.io.File
import
java.nio.file.Paths
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.Test
/**
* Created by pjvan_thof on 2/5/16.
*/
class
GearsKrakenTest
extends
TestNGSuite
with
Matchers
{
private
def
resourcePath
(
p
:
String
)
:
String
=
{
Paths
.
get
(
getClass
.
getResource
(
p
).
toURI
).
toString
}
@Test
def
testConvertKrakenJsonToKronaXml
:
Unit
=
{
val
krakenJsonFile
=
new
File
(
resourcePath
(
"/hpv_simu_R1.krkn.json"
))
val
outputFile
=
File
.
createTempFile
(
"krona."
,
".xml"
)
outputFile
.
deleteOnExit
()
GearsKraken
.
convertKrakenJsonToKronaXml
(
Map
(
"test"
->
krakenJsonFile
),
outputFile
)
}
}
public/gears/src/test/scala/nl/lumc/sasc/biopet/pipelines/gears/GearsTest.scala
View file @
6b8b3a37
...
...
@@ -9,11 +9,11 @@ import org.apache.commons.io.FileUtils
import
org.broadinstitute.gatk.queue.QSettings
import
org.scalatest.Matchers
import
org.scalatest.testng.TestNGSuite
import
org.testng.annotations.
{
DataProvider
,
Test
,
AfterClass
}
import
org.testng.annotations.
{
DataProvider
,
Test
,
AfterClass
}
/**
* Created by pjvanthof on 04/02/16.
*/
* Created by pjvanthof on 04/02/16.
*/
class
GearsTest
extends
TestNGSuite
with
Matchers
{
def
initPipeline
(
map
:
Map
[
String
,
Any
])
:
Gears
=
{
new
Gears
{
...
...
@@ -35,7 +35,6 @@ class GearsTest extends TestNGSuite with Matchers {
)
yield
Array
(
""
,
s1
,
s2
,
qiimeClosed
)
}
@Test
(
dataProvider
=
"gearsOptions"
)
def
testGears
(
dummy
:
String
,
sample1
:
Boolean
,
sample2
:
Boolean
,
qiimeCLosed
:
Boolean
)
:
Unit
=
{
val
map
=
{
...
...
@@ -53,7 +52,6 @@ class GearsTest extends TestNGSuite with Matchers {
val
pipeline
=
initPipeline
(
map
)
pipeline
.
script
()
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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