+ * Calculate and save in a temporary map the position of each annotation's
+ * sequence (if it has one) in the alignment. Faster to do this once than for
+ * every annotation comparison.
+ *
+ * @param alignmentAnnotations
+ */
+ private void saveSequenceIndices(
+ AlignmentAnnotation[] alignmentAnnotations)
+ {
+ sequenceIndices.clear();
+ for (AlignmentAnnotation ann : alignmentAnnotations) {
+ SequenceI seq = ann.sequenceRef;
+ if (seq != null) {
+ int index = AlignmentUtils.getSequenceIndex(alignment, seq);
+ sequenceIndices.put(seq, index);
+ }
+ }
+ }
+
+ /**