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-34 - quick hack to see how we can do alignment comparison for splitframes linking...
[jalview.git]
/
src
/
jalview
/
datamodel
/
ContactMapHolder.java
diff --git
a/src/jalview/datamodel/ContactMapHolder.java
b/src/jalview/datamodel/ContactMapHolder.java
index
296feaf
..
45c0d18
100644
(file)
--- a/
src/jalview/datamodel/ContactMapHolder.java
+++ b/
src/jalview/datamodel/ContactMapHolder.java
@@
-3,8
+3,11
@@
package jalview.datamodel;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
import java.util.Map;
+import jalview.ws.datamodel.MappableContactMatrixI;
+
public class ContactMapHolder implements ContactMapHolderI
{
public class ContactMapHolder implements ContactMapHolderI
{
@@
-15,7
+18,9
@@
public class ContactMapHolder implements ContactMapHolderI
{
if (contactmaps != null && contactmaps.size() > 0)
{
{
if (contactmaps != null && contactmaps.size() > 0)
{
- return contactmaps.values();
+ // defensive copy, and return non redundant set of ContactMatrixI
+ // instances
+ return new HashSet<ContactMatrixI>(contactmaps.values());
}
return Collections.EMPTY_LIST;
}
}
return Collections.EMPTY_LIST;
}
@@
-28,6
+33,14
@@
public class ContactMapHolder implements ContactMapHolderI
{
return null;
}
{
return null;
}
+ if (cm instanceof MappableContactMatrixI)
+ {
+ if (_aa.sequenceRef != null)
+ {
+ return ((MappableContactMatrixI) cm)
+ .getMappableContactList(_aa.sequenceRef, column);
+ }
+ }
// TODO: could resolve sequence position to column position here
// TODO: what about for complexes - where contactMatrix may involve two or
// more sequences
// TODO: could resolve sequence position to column position here
// TODO: what about for complexes - where contactMatrix may involve two or
// more sequences
@@
-49,9
+62,9
@@
public class ContactMapHolder implements ContactMapHolderI
contactmaps.put(aa.annotationId, cm);
// TODO: contact matrices could be intra or inter - more than one refseq
// possible!
contactmaps.put(aa.annotationId, cm);
// TODO: contact matrices could be intra or inter - more than one refseq
// possible!
- if (cm.hasReferenceSeq())
+ if (cm instanceof MappableContactMatrixI)
{
{
- aa.setSequenceRef(cm.getReferenceSeq());
+ aa.setSequenceRef(((MappableContactMatrixI) cm).getReferenceSeq());
}
return aa;
}
}
return aa;
}