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
Merge branch 'develop' into features/JAL-4134_use_annotation_row_for_colours_and_groups
[jalview.git]
/
src
/
jalview
/
datamodel
/
ContactMapHolder.java
diff --git
a/src/jalview/datamodel/ContactMapHolder.java
b/src/jalview/datamodel/ContactMapHolder.java
index
5849374
..
af083dd
100644
(file)
--- a/
src/jalview/datamodel/ContactMapHolder.java
+++ b/
src/jalview/datamodel/ContactMapHolder.java
@@
-5,6
+5,8
@@
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.HashMap;
import java.util.Map;
+import jalview.ws.datamodel.MappableContactMatrixI;
+
public class ContactMapHolder implements ContactMapHolderI
{
public class ContactMapHolder implements ContactMapHolderI
{
@@
-28,6
+30,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
@@
-44,14
+54,14
@@
public class ContactMapHolder implements ContactMapHolderI
aa.graphMin = cm.getMin();
aa.graphMax = cm.getMax();
aa.editable = false;
aa.graphMin = cm.getMin();
aa.graphMax = cm.getMax();
aa.editable = false;
- aa.calcId=cm.getType();
+ aa.calcId = cm.getType();
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;
}
@@
-72,8
+82,15
@@
public class ContactMapHolder implements ContactMapHolderI
annotation.editable = false;
annotation.graph = AlignmentAnnotation.CONTACT_MAP;
annotation.calcId = cm.getType();
annotation.editable = false;
annotation.graph = AlignmentAnnotation.CONTACT_MAP;
annotation.calcId = cm.getType();
- annotation.label = cm.getAnnotLabel();
- annotation.description = cm.getAnnotDescr();
+ if (annotation.label == null || "".equals(annotation.label))
+ {
+ annotation.label = cm.getAnnotLabel();
+
+ }
+ if (annotation.description == null || "".equals(annotation.description))
+ {
+ annotation.description = cm.getAnnotDescr();
+ }
contactmaps.put(annotation.annotationId, cm);
}
}
contactmaps.put(annotation.annotationId, cm);
}
}