JAL-1015 resolve dataset sequence before searching for annotation
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 31 Aug 2012 10:50:13 +0000 (11:50 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 31 Aug 2012 10:50:13 +0000 (11:50 +0100)
src/jalview/io/SequenceAnnotationReport.java

index 8642446..7f46c67 100644 (file)
@@ -315,8 +315,12 @@ public class SequenceAnnotationReport
       tip.append("<br>" + tmp);
       maxWidth = Math.max(maxWidth, tmp.length());
     }
-
-    DBRefEntry[] dbrefs = sequence.getDatasetSequence().getDBRef();
+    SequenceI ds=sequence;
+    while (ds.getDatasetSequence()!=null)
+    {
+      ds=ds.getDatasetSequence();
+    }
+    DBRefEntry[] dbrefs = ds.getDBRef();
     if (showDbRefs && dbrefs != null)
     {
       for (int i = 0; i < dbrefs.length; i++)
@@ -329,8 +333,7 @@ public class SequenceAnnotationReport
     }
 
     // ADD NON POSITIONAL SEQUENCE INFO
-    SequenceFeature[] features = sequence.getDatasetSequence()
-            .getSequenceFeatures();
+    SequenceFeature[] features = ds.getSequenceFeatures();
     SequenceFeature[] tfeat = new SequenceFeature[1];
     if (showNpFeats && features != null)
     {