From 84965b0d97f7db54b0855ac7122586d89cac7e46 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 17 Jun 2019 13:18:12 +0100 Subject: [PATCH] JAL-3187 update unit test - protein variants not now precomputed --- test/jalview/io/vcf/VCFLoaderTest.java | 70 +++++++++++++++++++------------- 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/test/jalview/io/vcf/VCFLoaderTest.java b/test/jalview/io/vcf/VCFLoaderTest.java index a87c160..20cabbd 100644 --- a/test/jalview/io/vcf/VCFLoaderTest.java +++ b/test/jalview/io/vcf/VCFLoaderTest.java @@ -1,6 +1,7 @@ package jalview.io.vcf; import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; import jalview.bin.Cache; import jalview.datamodel.AlignmentI; @@ -178,13 +179,18 @@ public class VCFLoaderTest } } List proteinFeatures = peptide.getSequenceFeatures(); - assertEquals(proteinFeatures.size(), 1); - sf = proteinFeatures.get(0); - assertEquals(sf.getFeatureGroup(), "VCF"); - assertEquals(sf.getBegin(), 1); - assertEquals(sf.getEnd(), 1); - assertEquals(sf.getType(), SequenceOntologyI.NONSYNONYMOUS_VARIANT); - assertEquals(sf.getDescription(), "p.Ser1Thr"); + + /* + * JAL-3187 don't precompute protein features, do dynamically instead + */ + assertTrue(proteinFeatures.isEmpty()); + // assertEquals(proteinFeatures.size(), 1); + // sf = proteinFeatures.get(0); + // assertEquals(sf.getFeatureGroup(), "VCF"); + // assertEquals(sf.getBegin(), 1); + // assertEquals(sf.getEnd(), 1); + // assertEquals(sf.getType(), SequenceOntologyI.NONSYNONYMOUS_VARIANT); + // assertEquals(sf.getDescription(), "p.Ser1Thr"); } private File makeVcf() throws IOException @@ -445,13 +451,17 @@ public class VCFLoaderTest } } List proteinFeatures = peptide.getSequenceFeatures(); - assertEquals(proteinFeatures.size(), 1); - sf = proteinFeatures.get(0); - assertEquals(sf.getFeatureGroup(), "VCF"); - assertEquals(sf.getBegin(), 6); - assertEquals(sf.getEnd(), 6); - assertEquals(sf.getType(), SequenceOntologyI.NONSYNONYMOUS_VARIANT); - assertEquals(sf.getDescription(), "p.Ala6Gly"); + /* + * JAL-3187 don't precompute protein features, do dynamically instead + */ + assertTrue(proteinFeatures.isEmpty()); + // assertEquals(proteinFeatures.size(), 1); + // sf = proteinFeatures.get(0); + // assertEquals(sf.getFeatureGroup(), "VCF"); + // assertEquals(sf.getBegin(), 6); + // assertEquals(sf.getEnd(), 6); + // assertEquals(sf.getType(), SequenceOntologyI.NONSYNONYMOUS_VARIANT); + // assertEquals(sf.getDescription(), "p.Ala6Gly"); } /** @@ -605,20 +615,24 @@ public class VCFLoaderTest } } List proteinFeatures = peptide.getSequenceFeatures(); - SequenceFeatures.sortFeatures(proteinFeatures, true); - assertEquals(proteinFeatures.size(), 2); - sf = proteinFeatures.get(0); - assertEquals(sf.getFeatureGroup(), "VCF"); - assertEquals(sf.getBegin(), 1); - assertEquals(sf.getEnd(), 1); - assertEquals(sf.getType(), SequenceOntologyI.SYNONYMOUS_VARIANT); - assertEquals(sf.getDescription(), "agC/agT"); - sf = proteinFeatures.get(1); - assertEquals(sf.getFeatureGroup(), "VCF"); - assertEquals(sf.getBegin(), 4); - assertEquals(sf.getEnd(), 4); - assertEquals(sf.getType(), SequenceOntologyI.NONSYNONYMOUS_VARIANT); - assertEquals(sf.getDescription(), "p.Glu4Gly"); + /* + * JAL-3187 don't precompute protein features, do dynamically instead + */ + assertTrue(proteinFeatures.isEmpty()); + // SequenceFeatures.sortFeatures(proteinFeatures, true); + // assertEquals(proteinFeatures.size(), 2); + // sf = proteinFeatures.get(0); + // assertEquals(sf.getFeatureGroup(), "VCF"); + // assertEquals(sf.getBegin(), 1); + // assertEquals(sf.getEnd(), 1); + // assertEquals(sf.getType(), SequenceOntologyI.SYNONYMOUS_VARIANT); + // assertEquals(sf.getDescription(), "agC/agT"); + // sf = proteinFeatures.get(1); + // assertEquals(sf.getFeatureGroup(), "VCF"); + // assertEquals(sf.getBegin(), 4); + // assertEquals(sf.getEnd(), 4); + // assertEquals(sf.getType(), SequenceOntologyI.NONSYNONYMOUS_VARIANT); + // assertEquals(sf.getDescription(), "p.Glu4Gly"); /* * verify variant feature(s) added to transcript4 -- 1.7.10.2