package jalview.analysis;
-import jalview.datamodel.AlignmentAnnotation;
-import jalview.datamodel.SequenceI;
-import jalview.renderer.AnnotationRenderer;
-
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.List;
import java.util.Map;
+import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.SequenceI;
+import jalview.renderer.AnnotationRenderer;
+
public class AlignmentAnnotationUtils
{
for (AlignmentAnnotation aa : annotations)
{
+ /*
+ * Ignore non-positional annotations, can't render these against an
+ * alignment
+ */
+ if (aa.annotations == null)
+ {
+ continue;
+ }
if (forSequences != null
&& (aa.sequenceRef != null && forSequences
.contains(aa.sequenceRef)))
for (AlignmentAnnotation aa : alignPanel.getAlignment()
.getAlignmentAnnotation())
{
+ /*
+ * don't display non-positional annotations on an alignment
+ */
+ if (aa.annotations == null)
+ {
+ continue;
+ }
boolean apply = (aa.sequenceRef == null && forAlignment)
|| (aa.sequenceRef != null && forSequences);
if (apply)