fixed exception thrown when msa web service is applied to alignment with sequence...
authorjprocter <Jim Procter>
Thu, 27 Oct 2005 17:04:27 +0000 (17:04 +0000)
committerjprocter <Jim Procter>
Thu, 27 Oct 2005 17:04:27 +0000 (17:04 +0000)
src/jalview/analysis/SeqsetUtils.java

index bd0f45c..11a31be 100755 (executable)
@@ -49,7 +49,7 @@ public class SeqsetUtils
     sqinfo.put("Name", seq.getName());\r
     sqinfo.put("Start", new Integer(seq.getStart()));\r
     sqinfo.put("End", new Integer(seq.getEnd()));\r
-    sqinfo.put("SeqFeatures", seq.getSequenceFeatures());\r
+    sqinfo.put("SeqFeatures", (seq.getSequenceFeatures() !=null) ? seq.getSequenceFeatures() : new Vector());\r
     sqinfo.put("PdbId",\r
                (seq.getPDBId() != null) ? seq.getPDBId() : new String(""));\r
 \r
@@ -93,7 +93,7 @@ public class SeqsetUtils
       sq.setEnd(end.intValue());\r
     }\r
 \r
-    if (sfeatures != null)\r
+    if ((sfeatures != null) && (sfeatures.size()>0))\r
     {\r
       sq.setSequenceFeatures(sfeatures);\r
     }\r