From fb51c05d4a892eca391d3121b57ccfa35a555471 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Tue, 11 Jun 2019 19:28:59 +0100 Subject: [PATCH] JAL-3143 also parse "phase" from JSON response if present --- src/jalview/ext/ensembl/EnsemblFeatures.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/jalview/ext/ensembl/EnsemblFeatures.java b/src/jalview/ext/ensembl/EnsemblFeatures.java index 744191d..99ebc69 100644 --- a/src/jalview/ext/ensembl/EnsemblFeatures.java +++ b/src/jalview/ext/ensembl/EnsemblFeatures.java @@ -130,6 +130,7 @@ class EnsemblFeatures extends EnsemblRestClient int end = Integer.parseInt(obj.get("end").toString()); String source = obj.get("source").toString(); String strand = obj.get("strand").toString(); + Object phase = obj.get("phase"); String alleles = JSONUtils .arrayToList((JSONArray) obj.get("alleles")); String clinSig = JSONUtils @@ -155,6 +156,10 @@ class EnsemblFeatures extends EnsemblRestClient SequenceFeature sf = new SequenceFeature(type, desc, start, end, source); sf.setStrand("1".equals(strand) ? "+" : "-"); + if (phase != null) + { + sf.setPhase(phase.toString()); + } setFeatureAttribute(sf, obj, "id"); setFeatureAttribute(sf, obj, "Parent"); setFeatureAttribute(sf, obj, "consequence_type"); -- 1.7.10.2