From 4f01cbed392e95580e1bef8573db78b3a975f186 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Mon, 9 Oct 2017 10:27:06 +0100 Subject: [PATCH] JAL-2738 assertion for derived protein variant added --- test/jalview/io/vcf/VCFLoaderTest.java | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/test/jalview/io/vcf/VCFLoaderTest.java b/test/jalview/io/vcf/VCFLoaderTest.java index 13c6f95..4a254d2 100644 --- a/test/jalview/io/vcf/VCFLoaderTest.java +++ b/test/jalview/io/vcf/VCFLoaderTest.java @@ -505,6 +505,31 @@ public class VCFLoaderTest assertTrue(sf.getValue("CSQ").toString().contains("transcript3")); /* + * verify variants computed on protein product for transcript3 + * peptide is SWRECD + * codon variants are AGC/AGT position 1 which is synonymous + * and GAG/GGG which is E/G in position 4 + * the insertion variant is not transferred to the peptide + */ + DBRefEntry[] dbRefs = al.findName("transcript3").getDBRefs(); + SequenceI peptide = null; + for (DBRefEntry dbref : dbRefs) + { + if (dbref.getMap().getMap().getFromRatio() == 3) + { + peptide = dbref.getMap().getTo(); + } + } + List proteinFeatures = peptide.getSequenceFeatures(); + assertEquals(proteinFeatures.size(), 1); + sf = proteinFeatures.get(0); + assertEquals(sf.getFeatureGroup(), "VCF"); + assertEquals(sf.getBegin(), 4); + assertEquals(sf.getEnd(), 4); + assertEquals(sf.getType(), SequenceOntologyI.SEQUENCE_VARIANT); + assertEquals(sf.getDescription(), "p.Glu4Gly"); + + /* * verify variant feature(s) added to transcript4 * at columns 13 (2) and 17 (2), positions 7 and 11 */ -- 1.7.10.2