git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5788867
)
JAL-3081 autocalculated annotation first/last leaves others unchanged
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Thu, 14 Nov 2019 16:01:29 +0000
(16:01 +0000)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Thu, 14 Nov 2019 16:01:29 +0000
(16:01 +0000)
src/jalview/analysis/AnnotationSorter.java
patch
|
blob
|
history
src/jalview/api/AlignmentViewPanel.java
patch
|
blob
|
history
src/jalview/appletgui/AlignmentPanel.java
patch
|
blob
|
history
src/jalview/gui/AlignFrame.java
patch
|
blob
|
history
src/jalview/gui/AlignmentPanel.java
patch
|
blob
|
history
src/jalview/jbgui/GAlignFrame.java
patch
|
blob
|
history
src/jalview/project/Jalview2XML.java
patch
|
blob
|
history
src/jalview/ws/jws2/AbstractJabaCalcWorker.java
patch
|
blob
|
history
test/jalview/analysis/AnnotationSorterTest.java
patch
|
blob
|
history
diff --git
a/src/jalview/analysis/AnnotationSorter.java
b/src/jalview/analysis/AnnotationSorter.java
index
e5e9de4
..
f16d9ea
100644
(file)
--- a/
src/jalview/analysis/AnnotationSorter.java
+++ b/
src/jalview/analysis/AnnotationSorter.java
@@
-38,7
+38,6
@@
import java.util.Map;
*/
public class AnnotationSorter
{
*/
public class AnnotationSorter
{
-
/**
* enum for annotation sort options. The text description is used in the
* Preferences drop-down options. The enum name is saved in the preferences
/**
* enum for annotation sort options. The text description is used in the
* Preferences drop-down options. The enum name is saved in the preferences
@@
-93,18
+92,24
@@
public class AnnotationSorter
// working map of sequence index in alignment
private final Map<SequenceI, Integer> sequenceIndices = new HashMap<>();
// working map of sequence index in alignment
private final Map<SequenceI, Integer> sequenceIndices = new HashMap<>();
+ // if true, sort only repositions auto-calculated annotation (to top or
+ // bottom)
+ private final boolean autocalcOnly;
+
/**
* Constructor given an alignment and the location (top or bottom) of
* Consensus and similar.
*
* @param alignmentI
* @param showAutocalculatedAbove
/**
* Constructor given an alignment and the location (top or bottom) of
* Consensus and similar.
*
* @param alignmentI
* @param showAutocalculatedAbove
+ * @param autoCalcOnly
*/
public AnnotationSorter(AlignmentI alignmentI,
*/
public AnnotationSorter(AlignmentI alignmentI,
- boolean showAutocalculatedAbove)
+ boolean showAutocalculatedAbove, boolean autoCalcOnly)
{
this.alignment = alignmentI;
this.showAutocalcAbove = showAutocalculatedAbove;
{
this.alignment = alignmentI;
this.showAutocalcAbove = showAutocalculatedAbove;
+ this.autocalcOnly = autoCalcOnly;
}
/**
}
/**
@@
-159,6
+164,10
@@
public class AnnotationSorter
{
return showAutocalcAbove ? 1 : -1;
}
{
return showAutocalcAbove ? 1 : -1;
}
+ if (autocalcOnly)
+ {
+ return 0; // don't reorder other annotations
+ }
int sequenceOrder = compareSequences(o1, o2);
return sequenceOrder == 0 ? compareLabels(o1, o2) : sequenceOrder;
}
int sequenceOrder = compareSequences(o1, o2);
return sequenceOrder == 0 ? compareLabels(o1, o2) : sequenceOrder;
}
@@
-221,6
+230,10
@@
public class AnnotationSorter
{
return showAutocalcAbove ? 1 : -1;
}
{
return showAutocalcAbove ? 1 : -1;
}
+ if (autocalcOnly)
+ {
+ return 0; // don't reorder other annotations
+ }
int labelOrder = compareLabels(o1, o2);
return labelOrder == 0 ? compareSequences(o1, o2) : labelOrder;
}
int labelOrder = compareLabels(o1, o2);
return labelOrder == 0 ? compareSequences(o1, o2) : labelOrder;
}
diff --git
a/src/jalview/api/AlignmentViewPanel.java
b/src/jalview/api/AlignmentViewPanel.java
index
8918944
..
dd4f730
100644
(file)
--- a/
src/jalview/api/AlignmentViewPanel.java
+++ b/
src/jalview/api/AlignmentViewPanel.java
@@
-68,6
+68,9
@@
public interface AlignmentViewPanel extends OOMHandlerI
* Sorts annotations according to currently selected preferences. Does nothing
* if currently set to 'Custom' (manual) ordering, so as not to trash user
* customised annotation ordering.
* Sorts annotations according to currently selected preferences. Does nothing
* if currently set to 'Custom' (manual) ordering, so as not to trash user
* customised annotation ordering.
+ *
+ * @param autoCalcOnly
+ * if true, only automatically calculated annotations are reordered
*/
*/
- void sortAnnotations();
+ void sortAnnotations(boolean autoCalcOnly);
}
}
diff --git
a/src/jalview/appletgui/AlignmentPanel.java
b/src/jalview/appletgui/AlignmentPanel.java
index
25974d4
..
0eb5c88
100644
(file)
--- a/
src/jalview/appletgui/AlignmentPanel.java
+++ b/
src/jalview/appletgui/AlignmentPanel.java
@@
-20,7
+20,6
@@
*/
package jalview.appletgui;
*/
package jalview.appletgui;
-import jalview.analysis.AnnotationSorter;
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
import jalview.bin.JalviewLite;
import jalview.api.AlignViewportI;
import jalview.api.AlignmentViewPanel;
import jalview.bin.JalviewLite;
@@
-911,10
+910,6
@@
public class AlignmentPanel extends Panel
public void paintAlignment(boolean updateOverview,
boolean updateStructures)
{
public void paintAlignment(boolean updateOverview,
boolean updateStructures)
{
- final AnnotationSorter sorter = new AnnotationSorter(getAlignment(),
- av.isShowAutocalculatedAbove());
- sorter.sort(getAlignment().getAlignmentAnnotation(),
- av.getSortAnnotationsBy());
repaint();
if (updateStructures)
repaint();
if (updateStructures)
@@
-1158,7
+1153,7
@@
public class AlignmentPanel extends Panel
}
@Override
}
@Override
- public void sortAnnotations()
+ public void sortAnnotations(boolean autocalcOnly)
{
}
{
}
diff --git
a/src/jalview/gui/AlignFrame.java
b/src/jalview/gui/AlignFrame.java
index
63c0890
..
8994743
100644
(file)
--- a/
src/jalview/gui/AlignFrame.java
+++ b/
src/jalview/gui/AlignFrame.java
@@
-479,7
+479,7
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
}
});
}
});
- alignPanel.sortAnnotations();
+ alignPanel.sortAnnotations(false);
}
/**
}
/**
@@
-4691,7
+4691,7
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
}
if (isAnnotation)
{
}
if (isAnnotation)
{
- alignPanel.sortAnnotations();
+ alignPanel.sortAnnotations(false);
alignPanel.adjustAnnotationHeight();
viewport.updateSequenceIdColours();
buildSortByAnnotationScoresMenu();
alignPanel.adjustAnnotationHeight();
viewport.updateSequenceIdColours();
buildSortByAnnotationScoresMenu();
@@
-5412,9
+5412,9
@@
public class AlignFrame extends GAlignFrame implements DropTargetListener,
* Sorts annotations and repaints the alignment
*/
@Override
* Sorts annotations and repaints the alignment
*/
@Override
- public void sortAnnotations()
+ public void sortAnnotations(boolean autoCalcOnly)
{
{
- alignPanel.sortAnnotations();
+ alignPanel.sortAnnotations(autoCalcOnly);
alignPanel.paintAlignment(false, false);
}
alignPanel.paintAlignment(false, false);
}
diff --git
a/src/jalview/gui/AlignmentPanel.java
b/src/jalview/gui/AlignmentPanel.java
index
aba1e3d
..
b27d66d
100644
(file)
--- a/
src/jalview/gui/AlignmentPanel.java
+++ b/
src/jalview/gui/AlignmentPanel.java
@@
-826,13
+826,13
@@
public class AlignmentPanel extends GAlignmentPanel implements
* if currently set to 'Custom' (manual) ordering.
*/
@Override
* if currently set to 'Custom' (manual) ordering.
*/
@Override
- public void sortAnnotations()
+ public void sortAnnotations(boolean autoCalcOnly)
{
SequenceAnnotationOrder sortBy = av.getSortAnnotationsBy();
if (sortBy != SequenceAnnotationOrder.CUSTOM)
{
final AnnotationSorter sorter = new AnnotationSorter(getAlignment(),
{
SequenceAnnotationOrder sortBy = av.getSortAnnotationsBy();
if (sortBy != SequenceAnnotationOrder.CUSTOM)
{
final AnnotationSorter sorter = new AnnotationSorter(getAlignment(),
- av.isShowAutocalculatedAbove());
+ av.isShowAutocalculatedAbove(), autoCalcOnly);
sorter.sort(getAlignment().getAlignmentAnnotation(), sortBy);
}
}
sorter.sort(getAlignment().getAlignmentAnnotation(), sortBy);
}
}
diff --git
a/src/jalview/jbgui/GAlignFrame.java
b/src/jalview/jbgui/GAlignFrame.java
index
3aebcda
..
7caf7ea
100755
(executable)
--- a/
src/jalview/jbgui/GAlignFrame.java
+++ b/
src/jalview/jbgui/GAlignFrame.java
@@
-601,9
+601,6
@@
public class GAlignFrame extends JInternalFrame
hideAllAnnotations_actionPerformed(true, false);
}
});
hideAllAnnotations_actionPerformed(true, false);
}
});
- SequenceAnnotationOrder sortAnnotationsBy = SequenceAnnotationOrder
- .valueOf(Cache.getDefault(Preferences.SORT_ANNOTATIONS,
- SequenceAnnotationOrder.NONE.name()));
sortAnnBySequence = new JCheckBoxMenuItem(
MessageManager.getString("label.sort_annotations_by_sequence"));
sortAnnByLabel = new JCheckBoxMenuItem(
sortAnnBySequence = new JCheckBoxMenuItem(
MessageManager.getString("label.sort_annotations_by_sequence"));
sortAnnByLabel = new JCheckBoxMenuItem(
@@
-615,7
+612,7
@@
public class GAlignFrame extends JInternalFrame
public void actionPerformed(ActionEvent e)
{
setAnnotationSortOrder(SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
public void actionPerformed(ActionEvent e)
{
setAnnotationSortOrder(SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
- sortAnnotations();
+ sortAnnotations(false);
}
});
sortAnnByLabel.addActionListener(new ActionListener()
}
});
sortAnnByLabel.addActionListener(new ActionListener()
@@
-624,7
+621,7
@@
public class GAlignFrame extends JInternalFrame
public void actionPerformed(ActionEvent e)
{
setAnnotationSortOrder(SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
public void actionPerformed(ActionEvent e)
{
setAnnotationSortOrder(SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
- sortAnnotations();
+ sortAnnotations(false);
}
});
colourTextMenuItem = new JCheckBoxMenuItem(
}
});
colourTextMenuItem = new JCheckBoxMenuItem(
@@
-882,7
+879,7
@@
public class GAlignFrame extends JInternalFrame
{
if (setShowAutoCalculatedAbove(showAutoFirst.isSelected()))
{
{
if (setShowAutoCalculatedAbove(showAutoFirst.isSelected()))
{
- sortAnnotations();
+ sortAnnotations(true);
}
}
});
}
}
});
@@
-894,7
+891,7
@@
public class GAlignFrame extends JInternalFrame
{
if (setShowAutoCalculatedAbove(!showAutoLast.isSelected()))
{
{
if (setShowAutoCalculatedAbove(!showAutoLast.isSelected()))
{
- sortAnnotations();
+ sortAnnotations(true);
}
}
});
}
}
});
@@
-2012,11
+2009,12
@@
public class GAlignFrame extends JInternalFrame
}
/**
}
/**
- * Action on clicking sort annotations by type.
+ * Action on clicking sort annotations by type, or change position of
+ * autocalculated annotation
*
*
- * @param sortOrder
+ * @param autoCalcOnly
*/
*/
- protected void sortAnnotations()
+ protected void sortAnnotations(boolean autoCalcOnly)
{
}
{
}
diff --git
a/src/jalview/project/Jalview2XML.java
b/src/jalview/project/Jalview2XML.java
index
e15bb1a
..
c017d11
100644
(file)
--- a/
src/jalview/project/Jalview2XML.java
+++ b/
src/jalview/project/Jalview2XML.java
@@
-4029,6
+4029,7
@@
public class Jalview2XML
{
af = loadViewport(file, jseqs, hiddenSeqs, al, jalviewModel, view,
uniqueSeqSetId, viewId, autoAlan);
{
af = loadViewport(file, jseqs, hiddenSeqs, al, jalviewModel, view,
uniqueSeqSetId, viewId, autoAlan);
+ // TODO resort annotations here to their order in the project?
av = af.getViewport();
ap = af.alignPanel;
}
av = af.getViewport();
ap = af.alignPanel;
}
@@
-5196,7
+5197,7
@@
public class Jalview2XML
// recompute any autoannotation
af.alignPanel.updateAnnotation(false, true);
reorderAutoannotation(af, al, autoAlan);
// recompute any autoannotation
af.alignPanel.updateAnnotation(false, true);
reorderAutoannotation(af, al, autoAlan);
- af.sortAnnotations();
+ af.sortAnnotations(false);
af.alignPanel.alignmentChanged();
}
else
af.alignPanel.alignmentChanged();
}
else
diff --git
a/src/jalview/ws/jws2/AbstractJabaCalcWorker.java
b/src/jalview/ws/jws2/AbstractJabaCalcWorker.java
index
64a2662
..
2d91377
100644
(file)
--- a/
src/jalview/ws/jws2/AbstractJabaCalcWorker.java
+++ b/
src/jalview/ws/jws2/AbstractJabaCalcWorker.java
@@
-347,7
+347,7
@@
public abstract class AbstractJabaCalcWorker extends AlignCalcWorker
jalview.bin.Cache.log.debug("Updating result annotation from Job "
+ rslt + " at " + service.getUri());
updateResultAnnotation(true);
jalview.bin.Cache.log.debug("Updating result annotation from Job "
+ rslt + " at " + service.getUri());
updateResultAnnotation(true);
- ap.sortAnnotations();
+ ap.sortAnnotations(false);
ap.adjustAnnotationHeight();
}
}
ap.adjustAnnotationHeight();
}
}
diff --git
a/test/jalview/analysis/AnnotationSorterTest.java
b/test/jalview/analysis/AnnotationSorterTest.java
index
1c5a7f9
..
7153f67
100644
(file)
--- a/
test/jalview/analysis/AnnotationSorterTest.java
+++ b/
test/jalview/analysis/AnnotationSorterTest.java
@@
-76,7
+76,7
@@
public class AnnotationSorterTest
*/
protected AlignmentAnnotation[] buildAnnotations(int numAnns)
{
*/
protected AlignmentAnnotation[] buildAnnotations(int numAnns)
{
- List<AlignmentAnnotation> annlist = new ArrayList<AlignmentAnnotation>();
+ List<AlignmentAnnotation> annlist = new ArrayList<>();
for (int i = 0; i < numAnns; i++)
{
AlignmentAnnotation ann = new AlignmentAnnotation(SS + i, "", 0);
for (int i = 0; i < numAnns; i++)
{
AlignmentAnnotation ann = new AlignmentAnnotation(SS + i, "", 0);
@@
-115,7
+115,7
@@
public class AnnotationSorterTest
* </ul>
*/
@Test(groups = { "Functional" })
* </ul>
*/
@Test(groups = { "Functional" })
- public void testSortBySequenceAndType_autocalcLast()
+ public void testSortBySequenceAndLabel_autocalcLast()
{
// @formatter:off
anns[0].sequenceRef = al.getSequenceAt(1); anns[0].label = "label0";
{
// @formatter:off
anns[0].sequenceRef = al.getSequenceAt(1); anns[0].label = "label0";
@@
-127,7
+127,7
@@
public class AnnotationSorterTest
anns[6].sequenceRef = al.getSequenceAt(3); anns[6].label = "IRP";
// @formatter:on
anns[6].sequenceRef = al.getSequenceAt(3); anns[6].label = "IRP";
// @formatter:on
- AnnotationSorter testee = new AnnotationSorter(al, false);
+ AnnotationSorter testee = new AnnotationSorter(al, false, false);
testee.sort(anns, SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
assertEquals("label5", anns[0].label); // for sequence 0
assertEquals("label0", anns[1].label); // for sequence 1
testee.sort(anns, SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
assertEquals("label5", anns[0].label); // for sequence 0
assertEquals("label0", anns[1].label); // for sequence 1
@@
-142,7
+142,7
@@
public class AnnotationSorterTest
* Variant with autocalculated annotations sorting to front
*/
@Test(groups = { "Functional" })
* Variant with autocalculated annotations sorting to front
*/
@Test(groups = { "Functional" })
- public void testSortBySequenceAndType_autocalcFirst()
+ public void testSortBySequenceAndLabel_autocalcFirst()
{
// @formatter:off
anns[0].sequenceRef = al.getSequenceAt(1); anns[0].label = "label0";
{
// @formatter:off
anns[0].sequenceRef = al.getSequenceAt(1); anns[0].label = "label0";
@@
-154,7
+154,7
@@
public class AnnotationSorterTest
anns[6].sequenceRef = al.getSequenceAt(3); anns[6].label = "IRP";
// @formatter:on
anns[6].sequenceRef = al.getSequenceAt(3); anns[6].label = "IRP";
// @formatter:on
- AnnotationSorter testee = new AnnotationSorter(al, true);
+ AnnotationSorter testee = new AnnotationSorter(al, true, false);
testee.sort(anns, SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
assertEquals("Quality", anns[0].label); // autocalc annotations
assertEquals("Consensus", anns[1].label); // retain ordering
testee.sort(anns, SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
assertEquals("Quality", anns[0].label); // autocalc annotations
assertEquals("Consensus", anns[1].label); // retain ordering
@@
-178,7
+178,7
@@
public class AnnotationSorterTest
* </ul>
*/
@Test(groups = { "Functional" })
* </ul>
*/
@Test(groups = { "Functional" })
- public void testSortByTypeAndSequence_autocalcLast()
+ public void testSortByLabelAndSequence_autocalcLast()
{
// @formatter:off
anns[0].sequenceRef = al.getSequenceAt(1); anns[0].label = "label0";
{
// @formatter:off
anns[0].sequenceRef = al.getSequenceAt(1); anns[0].label = "label0";
@@
-190,7
+190,7
@@
public class AnnotationSorterTest
anns[6].sequenceRef = al.getSequenceAt(2); anns[6].label = "Structure";
// @formatter:on
anns[6].sequenceRef = al.getSequenceAt(2); anns[6].label = "Structure";
// @formatter:on
- AnnotationSorter testee = new AnnotationSorter(al, false);
+ AnnotationSorter testee = new AnnotationSorter(al, false, false);
testee.sort(anns, SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
assertEquals("IRON", anns[0].label); // IRON / sequence 0
assertEquals("iron", anns[1].label); // iron / sequence 3
testee.sort(anns, SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
assertEquals("IRON", anns[0].label); // IRON / sequence 0
assertEquals("iron", anns[1].label); // iron / sequence 3
@@
-205,7
+205,7
@@
public class AnnotationSorterTest
* Variant of test with autocalculated annotations sorted to front
*/
@Test(groups = { "Functional" })
* Variant of test with autocalculated annotations sorted to front
*/
@Test(groups = { "Functional" })
- public void testSortByTypeAndSequence_autocalcFirst()
+ public void testSortByLabelAndSequence_autocalcFirst()
{
// @formatter:off
anns[0].sequenceRef = al.getSequenceAt(1); anns[0].label = "label0";
{
// @formatter:off
anns[0].sequenceRef = al.getSequenceAt(1); anns[0].label = "label0";
@@
-217,7
+217,7
@@
public class AnnotationSorterTest
anns[6].sequenceRef = al.getSequenceAt(2); anns[6].label = "Structure";
// @formatter:on
anns[6].sequenceRef = al.getSequenceAt(2); anns[6].label = "Structure";
// @formatter:on
- AnnotationSorter testee = new AnnotationSorter(al, true);
+ AnnotationSorter testee = new AnnotationSorter(al, true, false);
testee.sort(anns, SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
assertEquals("Quality", anns[0].label); // autocalc annotations
assertEquals("Consensus", anns[1].label); // retain ordering
testee.sort(anns, SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
assertEquals("Quality", anns[0].label); // autocalc annotations
assertEquals("Consensus", anns[1].label); // retain ordering
@@
-245,7
+245,7
@@
public class AnnotationSorterTest
anns[6].sequenceRef = al.getSequenceAt(2); anns[6].label = "Structure";
// @formatter:on
anns[6].sequenceRef = al.getSequenceAt(2); anns[6].label = "Structure";
// @formatter:on
- AnnotationSorter testee = new AnnotationSorter(al, true);
+ AnnotationSorter testee = new AnnotationSorter(al, true, false);
testee.sort(anns, SequenceAnnotationOrder.NONE);
assertEquals("Quality", anns[0].label); // autocalc annotations
assertEquals("Consensus", anns[1].label); // retain ordering
testee.sort(anns, SequenceAnnotationOrder.NONE);
assertEquals("Quality", anns[0].label); // autocalc annotations
assertEquals("Consensus", anns[1].label); // retain ordering
@@
-287,7
+287,7
@@
public class AnnotationSorterTest
annotations[i].label = "label" + i;
}
long startTime = System.currentTimeMillis();
annotations[i].label = "label" + i;
}
long startTime = System.currentTimeMillis();
- AnnotationSorter testee = new AnnotationSorter(alignment, false);
+ AnnotationSorter testee = new AnnotationSorter(alignment, false, false);
testee.sort(annotations, SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
long endTime = System.currentTimeMillis();
final long elapsed = endTime - startTime;
testee.sort(annotations, SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
long endTime = System.currentTimeMillis();
final long elapsed = endTime - startTime;
@@
-331,7
+331,7
@@
public class AnnotationSorterTest
annotations[i].label = "label" + i;
}
long startTime = System.currentTimeMillis();
annotations[i].label = "label" + i;
}
long startTime = System.currentTimeMillis();
- AnnotationSorter testee = new AnnotationSorter(alignment, false);
+ AnnotationSorter testee = new AnnotationSorter(alignment, false, false);
testee.sort(annotations, SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
long endTime = System.currentTimeMillis();
final long elapsed = endTime - startTime;
testee.sort(annotations, SequenceAnnotationOrder.SEQUENCE_AND_LABEL);
long endTime = System.currentTimeMillis();
final long elapsed = endTime - startTime;
@@
-384,7
+384,7
@@
public class AnnotationSorterTest
annotations[i].label = labels[r.nextInt(labels.length)];
}
long startTime = System.currentTimeMillis();
annotations[i].label = labels[r.nextInt(labels.length)];
}
long startTime = System.currentTimeMillis();
- AnnotationSorter testee = new AnnotationSorter(alignment, false);
+ AnnotationSorter testee = new AnnotationSorter(alignment, false, false);
testee.sort(annotations, SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
long endTime = System.currentTimeMillis();
long elapsed = endTime - startTime;
testee.sort(annotations, SequenceAnnotationOrder.LABEL_AND_SEQUENCE);
long endTime = System.currentTimeMillis();
long elapsed = endTime - startTime;