From af6171166b2040e83d83d8c3eff09ed36b557220 Mon Sep 17 00:00:00 2001
From: Sander Bollen <a.h.b.bollen@lumc.nl>
Date: Tue, 27 Sep 2016 16:03:47 +0200
Subject: [PATCH] add test

---
 .../src/test/resources/star_genotype.vcf.gz       | Bin 0 -> 426 bytes
 .../src/test/resources/star_genotype.vcf.gz.tbi   | Bin 0 -> 93 bytes
 .../nl/lumc/sasc/biopet/tools/VcfFilterTest.scala |   5 +++++
 3 files changed, 5 insertions(+)
 create mode 100644 biopet-tools/src/test/resources/star_genotype.vcf.gz
 create mode 100644 biopet-tools/src/test/resources/star_genotype.vcf.gz.tbi

diff --git a/biopet-tools/src/test/resources/star_genotype.vcf.gz b/biopet-tools/src/test/resources/star_genotype.vcf.gz
new file mode 100644
index 0000000000000000000000000000000000000000..719fa80d143fa157fe229e5cdfabe129e2d3a9e7
GIT binary patch
literal 426
zcmV;b0agAViwFb&00000{{{d;LjnMe0i}^|YuhjohhM9o;%MG%!+4Qv7t&4x5m%WZ
z|C)GvJ5>8(3lzzdm2Lg@liiNeFvei-euC%j(cMiZ2c_{~-BEh>WiGy_adI)46l<|z
zABvpud9*$qAJ8!#m5&{=!gy@ZMLG7BQ=M1VuuHBrYJ|$3j0a_)L1TTO`v^j7Kv}iG
zmnF!Niw4BE2)#TaSXZM1*@ITS$NKW)E4?_=3vH$Uqg*)rc0yA<{<m}e+e!a2a%sKP
zU`7z^;aSrUnrg`P%M!-+VzXQEaunp-e-ZGmbM~hScR_F{YpAjFExZ|W4?k4Mt9zDY
zS(xVO`4FH1??F0*a958G>$m6nMR}&*d#6nE+P--H{8(IB<5e>jSFNLwM$`C~CFv~5
zrq>A#%>2`Cvm)Ego)kIR-3by_PwqeSB@xB4yxWmsz2xZ^WG|1M#;<frFNS`ErrB&p
zVp5WK<SL8lRmgnK(pxSVji<MK%~G-`Z}KgfzK?I{FWQ51VzmMQ03VA81ONa400936
U0763o02=@U000000000009}vEY5)KL

literal 0
HcmV?d00001

diff --git a/biopet-tools/src/test/resources/star_genotype.vcf.gz.tbi b/biopet-tools/src/test/resources/star_genotype.vcf.gz.tbi
new file mode 100644
index 0000000000000000000000000000000000000000..52b6c13ae020debc91807d496f20d596cdf72299
GIT binary patch
literal 93
zcmb2|=3rp}f&Xj_PR>jW4h-CdpHfm%5)u-ak|cPUP6f;o?U-!b#dC1dJSPEHUV~7c
bS_Qo>35JVa`nrKYee!4qNHZ{l%>xkt7d{g(

literal 0
HcmV?d00001

diff --git a/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfFilterTest.scala b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfFilterTest.scala
index 9cc0d60d2..6ff7a170b 100644
--- a/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfFilterTest.scala
+++ b/biopet-tools/src/test/scala/nl/lumc/sasc/biopet/tools/VcfFilterTest.scala
@@ -39,7 +39,9 @@ class VcfFilterTest extends TestNGSuite with MockitoSugar with Matchers {
   }
 
   val veppedPath = resourcePath("/VEP_oneline.vcf")
+  val starPath = resourcePath("/star_genotype.vcf.gz")
   val vepped = new File(veppedPath)
+  val star = new File(starPath)
   val rand = new Random()
 
   @Test def testOutputTypeVcf() = {
@@ -183,6 +185,9 @@ class VcfFilterTest extends TestNGSuite with MockitoSugar with Matchers {
     mustHaveVariant(record, List("Sample_101")) shouldBe true
     mustHaveVariant(record, List("Sample_101", "Sample_102")) shouldBe true
     mustHaveVariant(record, List("Sample_101", "Sample_102", "Sample_103")) shouldBe false
+
+    val starReader = new VCFFileReader(star, false)
+    starReader.iterator().foreach(x => mustHaveVariant(x, List("Sample_101")) shouldBe false)
   }
 
   @Test def testSameGenotype() = {
-- 
GitLab