From 89176d88cd000522d92623d6cb6bacf154c4c9e7 Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 1 Nov 2005 16:01:03 +0000 Subject: [PATCH] stores reference to dataset sequence if present --- src/jalview/analysis/SeqsetUtils.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/jalview/analysis/SeqsetUtils.java b/src/jalview/analysis/SeqsetUtils.java index 11a31be..06a8192 100755 --- a/src/jalview/analysis/SeqsetUtils.java +++ b/src/jalview/analysis/SeqsetUtils.java @@ -52,7 +52,7 @@ public class SeqsetUtils sqinfo.put("SeqFeatures", (seq.getSequenceFeatures() !=null) ? seq.getSequenceFeatures() : new Vector()); sqinfo.put("PdbId", (seq.getPDBId() != null) ? seq.getPDBId() : new String("")); - + sqinfo.put("datasetSequence", (seq.getDatasetSequence() !=null) ? seq.getDatasetSequence() : new Sequence("THISISAPLACEHOLDER","")); return sqinfo; } @@ -72,7 +72,7 @@ public class SeqsetUtils java.util.Vector sfeatures = (java.util.Vector) sqinfo.get( "SeqFeatures"); String pdbid = (String) sqinfo.get("PdbId"); - + Sequence seqds = (Sequence) sqinfo.get("datasetSequence"); if (oldname == null) { namePresent = false; @@ -97,6 +97,9 @@ public class SeqsetUtils { sq.setSequenceFeatures(sfeatures); } + if ((seqds!=null) && !(seqds.getName().equals("THISISAPLACEHOLDER") && seqds.getLength()==0)) { + sq.setDatasetSequence(seqds); + } return namePresent; } -- 1.7.10.2