<commit_before>package org.broadinstitute.hail.methods

import org.apache.spark.SparkException
import org.broadinstitute.hail.SparkSuite
import org.broadinstitute.hail.driver._
import org.broadinstitute.hail.expr.TStruct
import org.testng.annotations.Test

class ImportVCFSuite extends SparkSuite {

  @Test def testInfo() {
    var s = State(sc, sqlContext)
    s = ImportVCF.run(s, Array("src/test/resources/infochar.vcf"))

    // force
    s = Count.run(s)
  }

  @Test def lineRef() {

    val line1 = "20\t10280082\t.\tA\tG\t844.69\tPASS\tAC=1;..."
    assert(LoadVCF.lineRef(line1) == "A")

    val line2 = "20\t13561632\t.\tTAA\tT\t89057.4\tPASS\tAC=2;..."
    assert(LoadVCF.lineRef(line2) == "TAA")

    assert(LoadVCF.lineRef("") == "")

    assert(LoadVCF.lineRef("this\tis\ta") == "")

    assert(LoadVCF.lineRef("20\t0\t.\t") == "")

    assert(LoadVCF.lineRef("20\t0\t.\t\t") == "")

    assert(LoadVCF.lineRef("\t\t\tabcd") == "abcd")
  }

  @Test def symbolicOrSV() {
    var s = State(sc, sqlContext)
    s = ImportVCF.run(s, Array("src/test/resources/symbolicVariant.vcf"))
    val n = s.vds.nVariants

    assert(n == 1)
    assert(VCFReport.accumulators.head._2.value(VCFReport.SymbolicOrSV) == 2)
  }

  @Test def testStoreGQ() {<commit_msg>Fixed compiler error in tests.<commit_after>package org.broadinstitute.hail.methods

import org.apache.spark.SparkException
import org.broadinstitute.hail.SparkSuite
import org.broadinstitute.hail.driver._
import org.broadinstitute.hail.expr.TStruct
import org.testng.annotations.Test

class ImportVCFSuite extends SparkSuite {

  @Test def testInfo() {
    var s = State(sc, sqlContext)
    s = ImportVCF.run(s, Array("src/test/resources/infochar.vcf"))

    // force
    s = Count.run(s)
  }

  @Test def lineRef() {

    val line1 = "20\t10280082\t.\tA\tG\t844.69\tPASS\tAC=1;..."
    assert(LoadVCF.lineRef(line1) == "A")

    val line2 = "20\t13561632\t.\tTAA\tT\t89057.4\tPASS\tAC=2;..."
    assert(LoadVCF.lineRef(line2) == "TAA")

    assert(LoadVCF.lineRef("") == "")

    assert(LoadVCF.lineRef("this\tis\ta") == "")

    assert(LoadVCF.lineRef("20\t0\t.\t") == "")

    assert(LoadVCF.lineRef("20\t0\t.\t\t") == "")

    assert(LoadVCF.lineRef("\t\t\tabcd") == "abcd")
  }

  @Test def symbolicOrSV() {
    var s = State(sc, sqlContext)
    s = ImportVCF.run(s, Array("src/test/resources/symbolicVariant.vcf"))
    val n = s.vds.nVariants

    assert(n == 1)
    assert(VCFReport.accumulators.head._2.value(VCFReport.Symbolic) == 2)
  }

  @Test def testStoreGQ() {
{'fraction_non_alphanumeric': 0.17526585269791256, 'fraction_numerical': 0.03623473808586058, 'mean_word_length': 3.4405594405594404, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2497504', 'n_tokens_mistral': 1077, 'n_tokens_neox': 1006, 'n_words': 140}