import jalview.analysis.AAFrequency;
import jalview.analysis.AlignmentAnnotationUtils;
+import jalview.analysis.AnnotationSorter;
import jalview.analysis.Conservation;
import jalview.commands.ChangeCaseCommand;
import jalview.commands.EditCommand;
* Add annotations at the top of the annotation, in the same order as their
* related sequences.
*/
- int insertPosition = 0;
for (SequenceI seq : candidates.keySet())
{
for (AlignmentAnnotation ann : candidates.get(seq))
// adjust for gaps
copyAnn.adjustForAlignment();
// add to the alignment and set visible
- this.ap.getAlignment().addAnnotation(copyAnn, insertPosition++);
+ this.ap.getAlignment().addAnnotation(copyAnn);
copyAnn.visible = true;
}
}
+ // TODO: save annotation sort order on AlignViewport
+ // do sorting from AlignmentPanel.updateAnnotation()
+ new AnnotationSorter(this.ap.getAlignment())
+ .sortBySequenceAndType(this.ap.getAlignment()
+ .getAlignmentAnnotation());
refresh();
}