Commit 6b8b3a37 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added testing for kraken to krona method

parent 768f5596
{
"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" : "-"
}
}
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)
}
}
......@@ -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()
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment