From 98caedb5f03c12211cfc4e09d92726e2b61ed132 Mon Sep 17 00:00:00 2001 From: delangel Date: Thu, 22 Jul 2010 16:25:51 +0000 Subject: [PATCH] Forgot to update VCF4 unit test. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3853 348d0f76-0448-11de-a6fe-93d51630548a --- .../refdata/features/vcf4/VCF4UnitTest.java | 28 ++++--------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/java/test/org/broadinstitute/sting/gatk/refdata/features/vcf4/VCF4UnitTest.java b/java/test/org/broadinstitute/sting/gatk/refdata/features/vcf4/VCF4UnitTest.java index b38514798..1b5b15a31 100644 --- a/java/test/org/broadinstitute/sting/gatk/refdata/features/vcf4/VCF4UnitTest.java +++ b/java/test/org/broadinstitute/sting/gatk/refdata/features/vcf4/VCF4UnitTest.java @@ -201,26 +201,8 @@ public class VCF4UnitTest extends BaseTest { testSetup.codec.decode(twoFewInfoLine); } - // test that the variant context adds attributes for the original alleles when clipped - String clippedAlleleLine = "20\t14370\trs6054257\tGGG\tG\t29\tPASS\tNS=3;AF=0.5;DB;H2\tGT:GQ:DP:HQ\t0|1:48:1:51,51\t0|0:48:1:51,51\t0|0:48:1:51,51"; - @Test - public void testClippedAllelesAddedAsAnnotation() { - // TODO - either modify or kill this test -/* TestSetup testSetup = new TestSetup().invoke(vcfGenotypeFile); - VariantContext context = (VariantContext)testSetup.codec.decode(clippedAlleleLine); - Assert.assertTrue(context.hasAttribute(VCF4Codec.ORIGINAL_ALLELE_LIST)); - List alleles = (List)context.getAttribute(VCF4Codec.ORIGINAL_ALLELE_LIST); - Assert.assertEquals("Expected allele list of 2, got " + alleles.size(),2,alleles.size()); - Assert.assertTrue(alleles.get(0).basesMatch("GGG")); - Assert.assertTrue(alleles.get(1).basesMatch("G")); - */ } - // test that when we don't clip the alleles, we don't see the annotation - @Test - public void testNoClippedAllelesNoAddedAsAnnotation() { - TestSetup testSetup = new TestSetup().invoke(vcfGenotypeFile); - VariantContext context = (VariantContext)testSetup.codec.decode(twoFewInfoLine); - } + // test that we're getting the right genotype for a multi-base polymorphism String MNPLine = "20\t14370\trs6054257\tGG\tAT\t29\tPASS\tNS=3;DP=14;AF=0.5;DB;H2\tGT:GQ:DP:HQ\t0|0:48:1:51,51\t1|0:48:8:51,51\t1/1:43:5:.,."; @Test @@ -340,7 +322,7 @@ public class VCF4UnitTest extends BaseTest { alleles.add(Allele.create("GT",false)); Pair> locAndList = VCF4Codec.clipAlleles("1",1,ref,alleles); - Assert.assertTrue(locAndList.first.equals(GenomeLocParser.createGenomeLoc("1",2,3))); + Assert.assertTrue(locAndList.first.equals(GenomeLocParser.createGenomeLoc("1",1,3))); // we know the ordering //System.err.println(locAndList.second.get(0).toString()); @@ -364,7 +346,7 @@ public class VCF4UnitTest extends BaseTest { alleles.add(Allele.create("GGGT",false)); Pair> locAndList = VCF4Codec.clipAlleles("1",1,ref,alleles); - Assert.assertTrue(locAndList.first.equals(GenomeLocParser.createGenomeLoc("1",2,5))); + Assert.assertTrue(locAndList.first.equals(GenomeLocParser.createGenomeLoc("1",1,5))); // we know the ordering //System.err.println(locAndList.second.get(0).toString()); @@ -388,7 +370,7 @@ public class VCF4UnitTest extends BaseTest { alleles.add(Allele.create("GG",false)); Pair> locAndList = VCF4Codec.clipAlleles("1",1,ref,alleles); - Assert.assertTrue(locAndList.first.equals(GenomeLocParser.createGenomeLoc("1",2,4))); + Assert.assertTrue(locAndList.first.equals(GenomeLocParser.createGenomeLoc("1",1,4))); // we know the ordering Assert.assertTrue(locAndList.second.get(0).toString().equals("GGG*")); @@ -410,7 +392,7 @@ public class VCF4UnitTest extends BaseTest { alleles.add(Allele.create("GGG",false)); Pair> locAndList = VCF4Codec.clipAlleles("1",1,ref,alleles); - Assert.assertTrue(locAndList.first.equals(GenomeLocParser.createGenomeLoc("1",2,4))); + Assert.assertTrue(locAndList.first.equals(GenomeLocParser.createGenomeLoc("1",1,4))); // we know the ordering Assert.assertTrue(locAndList.second.get(0).toString().equals("GGG*"));