X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FAlignmentUtils.java;h=c25e56b625b221a344701eaf9dd568b88d2b89af;hb=3609d4b908fa64cab35f2348401baab3347188fc;hp=2b88cb064e77660f39437d8829cc9e6520d007f4;hpb=eda1adb8ef48c7c0da70635db7253a7489335603;p=jalview.git diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index 2b88cb0..c25e56b 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -1459,28 +1459,31 @@ public class AlignmentUtils final List result = new ArrayList<>(); for (AlignmentAnnotation dsann : datasetAnnotations) { - /* - * Find matching annotations on the alignment. If none is found, then - * add this annotation to the list of 'addable' annotations for this - * sequence. - */ - final Iterable matchedAlignmentAnnotations = al - .findAnnotations(seq, dsann.getCalcId(), dsann.label); - if (!matchedAlignmentAnnotations.iterator().hasNext()) + if (dsann.annotations != null) // ignore non-positional annotation { - result.add(dsann); - if (labelForCalcId != null) + /* + * Find matching annotations on the alignment. If none is found, then + * add this annotation to the list of 'addable' annotations for this + * sequence. + */ + final Iterable matchedAlignmentAnnotations = al + .findAnnotations(seq, dsann.getCalcId(), dsann.label); + if (!matchedAlignmentAnnotations.iterator().hasNext()) { - labelForCalcId.put(dsann.getCalcId(), dsann.label); + result.add(dsann); + if (labelForCalcId != null) + { + labelForCalcId.put(dsann.getCalcId(), dsann.label); + } } } - } - /* - * Save any addable annotations for this sequence - */ - if (!result.isEmpty()) - { - candidates.put(seq, result); + /* + * Save any addable annotations for this sequence + */ + if (!result.isEmpty()) + { + candidates.put(seq, result); + } } } }