From 4b10dbcd48c997447eece2ded18b4b6393d10eec Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 13 Apr 2016 21:31:42 +0100 Subject: [PATCH] =?utf8?q?JAL-2046=20fix:=20patched=20SeqsetUtils=20so=20seq?= =?utf8?q?uence=20features=20aren=E2=80=99t=20duplicated=20when=20reinstatin?= =?utf8?q?g=20sequence=20details?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/jalview/analysis/SeqsetUtils.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) 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); } -- 1.7.10.2