From: gmungoc Date: Tue, 11 Jun 2019 18:28:59 +0000 (+0100) Subject: JAL-3143 also parse "phase" from JSON response if present X-Git-Tag: Release_2_11_0~10^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=fb51c05d4a892eca391d3121b57ccfa35a555471;p=jalview.git JAL-3143 also parse "phase" from JSON response if present --- 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");