sortByAnnotScore.removeAll();
// almost certainly a quicker way to do this - but we keep it simple
Hashtable scoreSorts=new Hashtable();
- AlignmentAnnotation aann[] = viewport.alignment.getAlignmentAnnotation();
- for (int i=0;i<aann.length; i++)
+ AlignmentAnnotation aann[];
+ Enumeration sq = viewport.alignment.getSequences().elements();
+ while (sq.hasMoreElements())
{
- if (aann[i].hasScore() && aann[i].sequenceRef!=null)
+ aann = ((SequenceI) sq.nextElement()).getAnnotation();
+ for (int i=0;aann!=null && i<aann.length; i++)
{
- scoreSorts.put(aann[i].label, aann[i].label);
+ if (aann[i].hasScore() && aann[i].sequenceRef!=null)
+ {
+ scoreSorts.put(aann[i].label, aann[i].label);
+ }
}
}
Enumeration labels = scoreSorts.keys();