From: Jim Procter Date: Wed, 13 Apr 2016 20:31:42 +0000 (+0100) Subject: JAL-2046 fix: patched SeqsetUtils so sequence features aren’t duplicated when reinsta... X-Git-Tag: Release_2_10_0~249^2~29 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4b10dbcd48c997447eece2ded18b4b6393d10eec;p=jalview.git JAL-2046 fix: patched SeqsetUtils so sequence features aren’t duplicated when reinstating sequence details --- diff --git a/src/jalview/analysis/SeqsetUtils.java b/src/jalview/analysis/SeqsetUtils.java index 40bedad..b0ecfde 100755 --- a/src/jalview/analysis/SeqsetUtils.java +++ b/src/jalview/analysis/SeqsetUtils.java @@ -59,13 +59,19 @@ public class SeqsetUtils sfeat.addElement(sfarray[i]); } } - sqinfo.put("SeqFeatures", sfeat); - sqinfo.put("PdbId", + if (seq.getDatasetSequence() == null) + { + sqinfo.put("SeqFeatures", sfeat); + sqinfo.put("PdbId", (seq.getAllPDBEntries() != null) ? seq.getAllPDBEntries() : new Vector()); - sqinfo.put("datasetSequence", + } + else + { + sqinfo.put("datasetSequence", (seq.getDatasetSequence() != null) ? seq.getDatasetSequence() : new Sequence("THISISAPLACEHOLDER", "")); + } return sqinfo; } @@ -129,6 +135,11 @@ public class SeqsetUtils && !(seqds.getName().equals("THISISAPLACEHOLDER") && seqds .getLength() == 0)) { + if (sfeatures!=null) + { + System.err + .println("Implementation error: setting dataset sequence for a sequence which has sequence features.\n\tDataset sequence features will not be visible."); + } sq.setDatasetSequence(seqds); }