X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FAlignmentAnnotation.java;h=7990a5cfb6afb30796bdb60f1e1ca6945d1f0611;hb=ddcce112558a130196ca384c4683b4f9b7d7d133;hp=830dbc72a4645024a1baa4710396d9c51cd02171;hpb=837b34ffd916e7aa1cefd068b952652bad8482b5;p=jalview.git diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index 830dbc7..7990a5c 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -245,6 +245,7 @@ public class AlignmentAnnotation * * @see java.lang.Object#finalize() */ + @Override protected void finalize() throws Throwable { sequenceRef = null; @@ -1036,11 +1037,11 @@ public class AlignmentAnnotation } /** - * Associate this annotion with the aligned residues of a particular sequence. - * sequenceMapping will be updated in the following way: null sequenceI - - * existing mapping will be discarded but annotations left in mapped - * positions. valid sequenceI not equal to current sequenceRef: mapping is - * discarded and rebuilt assuming 1:1 correspondence TODO: overload with + * Associate this annotation with the aligned residues of a particular + * sequence. sequenceMapping will be updated in the following way: null + * sequenceI - existing mapping will be discarded but annotations left in + * mapped positions. valid sequenceI not equal to current sequenceRef: mapping + * is discarded and rebuilt assuming 1:1 correspondence TODO: overload with * parameter to specify correspondence between current and new sequenceRef * * @param sequenceI @@ -1304,7 +1305,8 @@ public class AlignmentAnnotation * @note caller should add the remapped annotation to newref if they have not * already */ - public void remap(SequenceI newref, int[][] mapping, int from, int to, + public void remap(SequenceI newref, HashMap mapping, + int from, int to, int idxoffset) { if (mapping != null) @@ -1312,7 +1314,7 @@ public class AlignmentAnnotation Map old = sequenceMapping; Map remap = new HashMap(); int index = -1; - for (int mp[] : mapping) + for (int mp[] : mapping.values()) { if (index++ < 0) {