From: gmungoc Date: Thu, 3 Sep 2020 13:04:15 +0000 (+0100) Subject: JAL-3576 IntervalStore updated to v1.2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=99b08242102fe82a7ea6ef7bec8f394bbeed5bea;p=jalview.git JAL-3576 IntervalStore updated to v1.2 --- diff --git a/j11lib/intervalstore-v1.1.jar b/j11lib/intervalstore-v1.1.jar deleted file mode 100644 index 668b543..0000000 Binary files a/j11lib/intervalstore-v1.1.jar and /dev/null differ diff --git a/j11lib/intervalstore-v1.2.jar b/j11lib/intervalstore-v1.2.jar new file mode 100644 index 0000000..fdd0ee7 Binary files /dev/null and b/j11lib/intervalstore-v1.2.jar differ diff --git a/j8lib/intervalstore-v1.1.jar b/j8lib/intervalstore-v1.1.jar deleted file mode 100644 index 668b543..0000000 Binary files a/j8lib/intervalstore-v1.1.jar and /dev/null differ diff --git a/j8lib/intervalstore-v1.2.jar b/j8lib/intervalstore-v1.2.jar new file mode 100644 index 0000000..fdd0ee7 Binary files /dev/null and b/j8lib/intervalstore-v1.2.jar differ diff --git a/test/jalview/io/vcf/VCFLoaderTest.java b/test/jalview/io/vcf/VCFLoaderTest.java index a719cc4..c8dd8f0 100644 --- a/test/jalview/io/vcf/VCFLoaderTest.java +++ b/test/jalview/io/vcf/VCFLoaderTest.java @@ -5,6 +5,16 @@ import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNull; import static org.testng.Assert.assertTrue; +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.List; +import java.util.Map; + +import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeTest; +import org.testng.annotations.Test; + import jalview.bin.Cache; import jalview.datamodel.AlignmentI; import jalview.datamodel.DBRefEntry; @@ -20,16 +30,6 @@ import jalview.io.FileLoader; import jalview.io.gff.Gff3Helper; import jalview.util.MapList; -import java.io.File; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.List; -import java.util.Map; - -import org.testng.annotations.BeforeClass; -import org.testng.annotations.BeforeTest; -import org.testng.annotations.Test; - public class VCFLoaderTest { private static final float DELTA = 0.00001f; @@ -119,10 +119,24 @@ public class VCFLoaderTest .getSequenceFeatures(); SequenceFeatures.sortFeatures(geneFeatures, true); assertEquals(geneFeatures.size(), 5); + SequenceFeature sf = geneFeatures.get(0); assertEquals(sf.getFeatureGroup(), "VCF"); assertEquals(sf.getBegin(), 2); assertEquals(sf.getEnd(), 2); + assertEquals(sf.getType(), SEQUENCE_VARIANT); + assertEquals(sf.getScore(), 0f); + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 5.0e-03, + DELTA); + assertEquals(sf.getValue("AC_Female"), "12"); + // malformed float for AF_AFR is ignored (JAL-3375) + assertNull(sf.getValue("AC_AFR")); + assertEquals(sf.getValue(Gff3Helper.ALLELES), "A,T"); + + sf = geneFeatures.get(1); + assertEquals(sf.getFeatureGroup(), "VCF"); + assertEquals(sf.getBegin(), 2); + assertEquals(sf.getEnd(), 2); assertEquals(sf.getScore(), 0f); assertEquals(sf.getValue("AF"), "4.0e-03"); assertEquals(sf.getValue("AF_AFR"), "2.3e-4"); @@ -135,28 +149,17 @@ public class VCFLoaderTest // malformed integer for AC_Female is ignored (JAL-3375) assertNull(sf.getValue("AC_Female")); - sf = geneFeatures.get(1); - assertEquals(sf.getFeatureGroup(), "VCF"); - assertEquals(sf.getBegin(), 2); - assertEquals(sf.getEnd(), 2); - assertEquals(sf.getType(), SEQUENCE_VARIANT); - assertEquals(sf.getScore(), 0f); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 5.0e-03, - DELTA); - assertEquals(sf.getValue("AC_Female"), "12"); - // malformed float for AF_AFR is ignored (JAL-3375) - assertNull(sf.getValue("AC_AFR")); - assertEquals(sf.getValue(Gff3Helper.ALLELES), "A,T"); - sf = geneFeatures.get(2); assertEquals(sf.getFeatureGroup(), "VCF"); assertEquals(sf.getBegin(), 4); assertEquals(sf.getEnd(), 4); assertEquals(sf.getType(), SEQUENCE_VARIANT); assertEquals(sf.getScore(), 0f); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 2.0e-03, + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 3.0e-03, DELTA); - assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,C"); + assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,GA"); + assertNull(sf.getValue("ID")); // '.' is ignored + assertNull(sf.getValue("FILTER")); // '.' is ignored sf = geneFeatures.get(3); assertEquals(sf.getFeatureGroup(), "VCF"); @@ -164,11 +167,9 @@ public class VCFLoaderTest assertEquals(sf.getEnd(), 4); assertEquals(sf.getType(), SEQUENCE_VARIANT); assertEquals(sf.getScore(), 0f); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 3.0e-03, + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 2.0e-03, DELTA); - assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,GA"); - assertNull(sf.getValue("ID")); // '.' is ignored - assertNull(sf.getValue("FILTER")); // '.' is ignored + assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,C"); sf = geneFeatures.get(4); assertEquals(sf.getFeatureGroup(), "VCF"); @@ -186,24 +187,26 @@ public class VCFLoaderTest List transcriptFeatures = al.getSequenceAt(1) .getSequenceFeatures(); assertEquals(transcriptFeatures.size(), 3); + sf = transcriptFeatures.get(0); assertEquals(sf.getFeatureGroup(), "VCF"); assertEquals(sf.getBegin(), 2); assertEquals(sf.getEnd(), 2); assertEquals(sf.getType(), SEQUENCE_VARIANT); assertEquals(sf.getScore(), 0f); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 2.0e-03, + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 3.0e-03, DELTA); - assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,C"); + assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,GA"); + sf = transcriptFeatures.get(1); assertEquals(sf.getFeatureGroup(), "VCF"); assertEquals(sf.getBegin(), 2); assertEquals(sf.getEnd(), 2); assertEquals(sf.getType(), SEQUENCE_VARIANT); assertEquals(sf.getScore(), 0f); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 3.0e-03, + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 2.0e-03, DELTA); - assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,GA"); + assertEquals(sf.getValue(Gff3Helper.ALLELES), "G,C"); /* * verify SNP variant feature(s) computed and added to protein @@ -413,7 +416,7 @@ public class VCFLoaderTest DELTA); /* - * variant A/C at 45051611 maps to T/G at gene position 24 + * variant A/T at 45051611 maps to T/A at gene position 24 */ sf = geneFeatures.get(3); assertEquals(sf.getFeatureGroup(), "VCF"); @@ -421,12 +424,12 @@ public class VCFLoaderTest assertEquals(sf.getEnd(), 24); assertEquals(sf.getType(), SEQUENCE_VARIANT); assertEquals(sf.getScore(), 0f); - assertEquals(sf.getValue(Gff3Helper.ALLELES), "T,G"); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 4.0e-03, + assertEquals(sf.getValue(Gff3Helper.ALLELES), "T,A"); + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 5.0e-03, DELTA); /* - * variant A/T at 45051611 maps to T/A at gene position 24 + * variant A/C at 45051611 maps to T/G at gene position 24 */ sf = geneFeatures.get(4); assertEquals(sf.getFeatureGroup(), "VCF"); @@ -434,8 +437,8 @@ public class VCFLoaderTest assertEquals(sf.getEnd(), 24); assertEquals(sf.getType(), SEQUENCE_VARIANT); assertEquals(sf.getScore(), 0f); - assertEquals(sf.getValue(Gff3Helper.ALLELES), "T,A"); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 5.0e-03, + assertEquals(sf.getValue(Gff3Helper.ALLELES), "T,G"); + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 4.0e-03, DELTA); /* @@ -557,8 +560,8 @@ public class VCFLoaderTest assertEquals(sf.getBegin(), 13); assertEquals(sf.getEnd(), 13); assertEquals(sf.getScore(), 0f); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.5f, DELTA); - assertEquals(sf.getValue("alleles"), "C,T"); + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.4f, DELTA); + assertEquals(sf.getValue("alleles"), "C,G"); map = (Map) sf.getValue("CSQ"); assertEquals(map.size(), 9); @@ -566,8 +569,8 @@ public class VCFLoaderTest assertEquals(sf.getBegin(), 13); assertEquals(sf.getEnd(), 13); assertEquals(sf.getScore(), 0f); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.4f, DELTA); - assertEquals(sf.getValue("alleles"), "C,G"); + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.5f, DELTA); + assertEquals(sf.getValue("alleles"), "C,T"); map = (Map) sf.getValue("CSQ"); assertEquals(map.size(), 9); @@ -575,8 +578,8 @@ public class VCFLoaderTest assertEquals(sf.getBegin(), 17); assertEquals(sf.getEnd(), 17); assertEquals(sf.getScore(), 0f); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.7f, DELTA); - assertEquals(sf.getValue("alleles"), "A,G"); + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.6f, DELTA); + assertEquals(sf.getValue("alleles"), "A,AC"); map = (Map) sf.getValue("CSQ"); assertEquals(map.size(), 9); @@ -584,8 +587,8 @@ public class VCFLoaderTest assertEquals(sf.getBegin(), 17); assertEquals(sf.getEnd(), 17); // insertion assertEquals(sf.getScore(), 0f); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.6f, DELTA); - assertEquals(sf.getValue("alleles"), "A,AC"); + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.7f, DELTA); + assertEquals(sf.getValue("alleles"), "A,G"); map = (Map) sf.getValue("CSQ"); assertEquals(map.size(), 9); @@ -614,8 +617,9 @@ public class VCFLoaderTest assertEquals(sf.getBegin(), 11); assertEquals(sf.getEnd(), 11); assertEquals(sf.getScore(), 0f); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.7f, DELTA); - assertEquals(sf.getValue("alleles"), "A,G"); + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.6f, DELTA); + assertEquals(sf.getValue("alleles"), "A,AC"); + map = (Map) sf.getValue("CSQ"); assertEquals(map.size(), 9); assertEquals(sf.getValueAsString("CSQ", "Feature"), "transcript3"); @@ -623,8 +627,9 @@ public class VCFLoaderTest assertEquals(sf.getBegin(), 11); assertEquals(sf.getEnd(), 11); assertEquals(sf.getScore(), 0f); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.6f, DELTA); - assertEquals(sf.getValue("alleles"), "A,AC"); + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.7f, DELTA); + assertEquals(sf.getValue("alleles"), "A,G"); + map = (Map) sf.getValue("CSQ"); assertEquals(map.size(), 9); assertEquals(sf.getValueAsString("CSQ", "Feature"), "transcript3"); @@ -675,8 +680,9 @@ public class VCFLoaderTest assertEquals(sf.getBegin(), 7); assertEquals(sf.getEnd(), 7); assertEquals(sf.getScore(), 0f); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.5f, DELTA); - assertEquals(sf.getValue("alleles"), "C,T"); + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.4f, DELTA); + assertEquals(sf.getValue("alleles"), "C,G"); + map = (Map) sf.getValue("CSQ"); assertEquals(map.size(), 9); assertEquals(sf.getValueAsString("CSQ", "Feature"), "transcript4"); @@ -684,8 +690,9 @@ public class VCFLoaderTest assertEquals(sf.getBegin(), 7); assertEquals(sf.getEnd(), 7); assertEquals(sf.getScore(), 0f); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.4f, DELTA); - assertEquals(sf.getValue("alleles"), "C,G"); + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.5f, DELTA); + assertEquals(sf.getValue("alleles"), "C,T"); + map = (Map) sf.getValue("CSQ"); assertEquals(map.size(), 9); assertEquals(sf.getValueAsString("CSQ", "Feature"), "transcript4"); @@ -693,8 +700,9 @@ public class VCFLoaderTest assertEquals(sf.getBegin(), 11); assertEquals(sf.getEnd(), 11); assertEquals(sf.getScore(), 0f); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.7f, DELTA); - assertEquals(sf.getValue("alleles"), "A,G"); + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.6f, DELTA); + assertEquals(sf.getValue("alleles"), "A,AC"); + map = (Map) sf.getValue("CSQ"); assertEquals(map.size(), 9); assertEquals(sf.getValueAsString("CSQ", "Feature"), "transcript4"); @@ -702,8 +710,9 @@ public class VCFLoaderTest assertEquals(sf.getBegin(), 11); assertEquals(sf.getEnd(), 11); assertEquals(sf.getScore(), 0f); - assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.6f, DELTA); - assertEquals(sf.getValue("alleles"), "A,AC"); + assertEquals(Float.parseFloat((String) sf.getValue("AF")), 0.7f, DELTA); + assertEquals(sf.getValue("alleles"), "A,G"); + map = (Map) sf.getValue("CSQ"); assertEquals(map.size(), 9); assertEquals(sf.getValueAsString("CSQ", "Feature"), "transcript4"); }