VariantEffectPredictorTest.scala 1.75 KB
Newer Older
Peter van 't Hof's avatar
Peter van 't Hof committed
1 2 3 4 5 6 7 8 9 10
/**
 * Biopet is built on top of GATK Queue for building bioinformatic
 * pipelines. It is mainly intended to support LUMC SHARK cluster which is running
 * SGE. But other types of HPC that are supported by GATK Queue (such as PBS)
 * should also be able to execute Biopet tools and pipelines.
 *
 * Copyright 2014 Sequencing Analysis Support Core - Leiden University Medical Center
 *
 * Contact us at: sasc@lumc.nl
 *
11
 * A dual licensing mode is applied. The source code within this project is freely available for non-commercial use under an AGPL
Peter van 't Hof's avatar
Peter van 't Hof committed
12 13 14
 * license; For commercial users or users who do not want to follow the AGPL
 * license, please contact us to obtain a separate license.
 */
Sander Bollen's avatar
Sander Bollen committed
15 16 17 18 19 20 21 22 23 24
package nl.lumc.sasc.biopet.extensions

import java.io.File
import java.nio.file.Paths

import org.scalatest.Matchers
import org.scalatest.testng.TestNGSuite
import org.testng.annotations.Test

/**
Peter van 't Hof's avatar
Peter van 't Hof committed
25 26
 * Created by ahbbollen on 3-3-16.
 */
Sander Bollen's avatar
Sander Bollen committed
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
class VariantEffectPredictorTest extends TestNGSuite with Matchers {

  @Test
  def testSummaryStats = {
    val file = new File(Paths.get(getClass.getResource("/vep.metrics").toURI).toString)

    val vep = new VariantEffectPredictor(null)
    val stats = vep.parseStatsFile(file)

    stats.contains("VEP_run_statistics") shouldBe true
    stats.contains("General_statistics") shouldBe true
    stats.contains("Consequences_(most_severe)") shouldBe true
    stats.contains("Consequences_(all)") shouldBe true
    stats.contains("Coding_consequences") shouldBe true
    stats.contains("SIFT_summary") shouldBe true
    stats.contains("PolyPhen_summary") shouldBe true
    stats.contains("Variants_by_chromosome") shouldBe true
    stats.contains("Distribution_of_variants_on_chromosome_1") shouldBe true
    stats.contains("Position_in_protein") shouldBe true

  }

}