Skip to content
Snippets Groups Projects
Commit 60d0fb74 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added testing for qiime biom to krona method

parent 6b8b3a37
No related branches found
No related tags found
No related merge requests found
......@@ -79,8 +79,6 @@ object GearsQiimeClosed {
val counts: mutable.Map[String, Long] = mutable.Map()
def totalCount(sample: String): Long = counts.getOrElse(sample, 0L) + childs.map(_.totalCount(sample)).sum
override def toString() = s"$level:$name:$counts"
def node: Elem = {
val sizes = sortedSamples.map { sample => <val>{ totalCount(sample) }</val> }
val size = <size>{ sizes }</size>
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
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 GearsQiimeClosedTest extends TestNGSuite with Matchers {
private def resourcePath(p: String): String = {
Paths.get(getClass.getResource(p).toURI).toString
}
@Test
def testQiimeBiomToKrona: Unit = {
val qiimeBiomFile = new File(resourcePath("/otu_table.biom"))
val outputFile = File.createTempFile("krona.", ".xml")
outputFile.deleteOnExit()
GearsQiimeClosed.qiimeBiomToKrona(qiimeBiomFile, outputFile)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment