Details
Description
Grouping of annotation rows on an alignment view is defined by the jalview.datamodel.AlignmentAnnotation.graphGroup field, an integer, that when above -1, indicates a group index where annotation rows can be grouped to overlay line graphs.
Copy and pasting sequence associated annotation with line_graph groups results in exceptions in the following example:
>a
asdasd
>b
asdasd
>c
asdasd
SEQUENCE_REF a
annotation group 1 (annotation row 1 and 2)
SEQUENCE_REF b
annotation group 2 (annotation row 3 and 4)
SEQUENCE_REF c
annotation group 3 (annotation row 5 and 6)
The problem occurs when b is copied into a new window. The rendering code in v2.7 uses a preallocated boolean array to decide if a graphGroup has been laid out already, which is set to be the length of the alignment's annotation row vector. Since alignmentAnnotation rows are copied across - they inherit the same graphGroup in the new window, which for sequence C will be 3. This will cause an ArrayIndexOutOfBounds exception..
Copy and pasting sequence associated annotation with line_graph groups results in exceptions in the following example:
>a
asdasd
>b
asdasd
>c
asdasd
SEQUENCE_REF a
annotation group 1 (annotation row 1 and 2)
SEQUENCE_REF b
annotation group 2 (annotation row 3 and 4)
SEQUENCE_REF c
annotation group 3 (annotation row 5 and 6)
The problem occurs when b is copied into a new window. The rendering code in v2.7 uses a preallocated boolean array to decide if a graphGroup has been laid out already, which is set to be the length of the alignment's annotation row vector. Since alignmentAnnotation rows are copied across - they inherit the same graphGroup in the new window, which for sequence C will be 3. This will cause an ArrayIndexOutOfBounds exception..