git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1967 JAL-1479 refactored sequence<->structure mapping implementation
[jalview.git]
/
src
/
jalview
/
structure
/
StructureSelectionManager.java
diff --git
a/src/jalview/structure/StructureSelectionManager.java
b/src/jalview/structure/StructureSelectionManager.java
index
1541a6a
..
e9053ed
100644
(file)
--- a/
src/jalview/structure/StructureSelectionManager.java
+++ b/
src/jalview/structure/StructureSelectionManager.java
@@
-588,9
+588,7
@@
public class StructureSelectionManager
.getMappingFromS1(false);
maxChain.transferRESNUMFeatures(seq, null);
.getMappingFromS1(false);
maxChain.transferRESNUMFeatures(seq, null);
- // allocate enough slots to store the mapping from positions in
- // sequence[s] to the associated chain
- int[][] mapping = new int[seq.findPosition(seq.getLength()) + 2][2];
+ HashMap<Integer, int[]> mapping = new HashMap<Integer, int[]>();
int resNum = -10000;
int index = 0;
int resNum = -10000;
int index = 0;
@@
-604,8
+602,8
@@
public class StructureSelectionManager
{
// TODO (JAL-1836) address root cause: negative residue no in PDB
// file
{
// TODO (JAL-1836) address root cause: negative residue no in PDB
// file
- mapping[tmp.alignmentMapping + 1][0] = tmp.resNumber;
- mapping[tmp.alignmentMapping + 1][1] = tmp.atomIndex;
+ mapping.put(tmp.alignmentMapping + 1, new int[] { tmp.resNumber,
+ tmp.atomIndex });
}
}
}
}