X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fanalysis%2FAlignmentUtils.java;h=be2739f21ecf7f90f7009a1e289dc36e09fbf0c1;hb=c794c5033adeee182b03a5ea92c0a7495a29661f;hp=0c40873154035f5cbb2b1a6d264709add75810df;hpb=e1dbbc5edc07f65706eeb1dda9f4c9bcdee9d3a5;p=jalview.git diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index 0c40873..be2739f 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); + } } } }