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

Added unit test to SnptestToVcf

parent dca18c6a
No related branches found
No related tags found
No related merge requests found
# Completed successfully at 2016-04-08 13:47:05
# Analysis: "snptest"
# started: 2016-04-08 13:44:20
#
# Analysis properties:
# -analysis_name snptest (user-supplied)
# -data /exports/sasc/project-171/analysis/snptest/18/18-22307785-33461676.vcf.gz /exports/sasc/project-171/src/Phenotypes_knee_hip_hand.fixed2.txt (user-supplied)
# -o /exports/sasc/project-171/analysis/snptest/18/18-22307785-33461676.snptest (user-supplied)
# -summary_stats_only (user-supplied)
#
alternate_ids rsid chromosome position alleleA alleleB index average_maximum_posterior_call info cohort_1_AA cohort_1_AB cohort_1_BB cohort_1_NULL all_AA all_AB all_BB all_NULL all_total all_maf missing_data_proportion comment
rs184556815 rs184556815 18 22307810 G T 1 1 1 2869 0 0 0 2869 0 0 0 2869 0 0 NA
rs143248971 rs143248971 18 22307875 C T 2 1 1 2869 0 0 0 2869 0 0 0 2869 0 0 NA
rs74666159 rs74666159 18 22307884 C T 3 1 1 2690 177 2 0 2690 177 2 0 2869 0.0315441 0 NA
# Completed successfully at 2016-04-08 13:47:05
......@@ -45,6 +45,4 @@ object GensToVcfTest {
private def resourcePath(p: String): String = {
Paths.get(getClass.getResource(p).toURI).toString
}
}
package nl.lumc.sasc.biopet.tools
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 4/11/16.
*/
class SnptestToVcfTest extends TestNGSuite with Matchers {
@Test
def testSnptest: Unit = {
val output = File.createTempFile("test.", ".vcf.gz")
output.deleteOnExit()
SnptestToVcf.main(Array(
"--inputInfo", SnptestToVcfTest.resourcePath("/test.snptest"),
"--outputVcf", output.getAbsolutePath,
"--referenceFasta", SnptestToVcfTest.resourcePath("/fake_chrQ.fa"),
"--contig", "chrQ"
))
}
@Test
def testEmptySnptest: Unit = {
val output = File.createTempFile("test.", ".vcf.gz")
output.deleteOnExit()
SnptestToVcf.main(Array(
"--inputInfo", SnptestToVcfTest.resourcePath("/test.empty.snptest"),
"--outputVcf", output.getAbsolutePath,
"--referenceFasta", SnptestToVcfTest.resourcePath("/fake_chrQ.fa"),
"--contig", "chrQ"
))
}
}
object SnptestToVcfTest {
private def resourcePath(p: String): String = {
Paths.get(getClass.getResource(p).toURI).toString
}
}
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