- // cache 'alignment sequence position' for the annotations
- saveSequenceIndices(alignmentAnnotations);
+
+ /*
+ * cache 'alignment sequence positions' if required for sorting
+ */
+ if (order == SequenceAnnotationOrder.SEQUENCE_AND_LABEL
+ || order == SequenceAnnotationOrder.LABEL_AND_SEQUENCE)
+ {
+ saveSequenceIndices(alignmentAnnotations);
+ }