X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fdatamodel%2FContactMapHolder.java;h=af083dd01ac3d8c78831c48136a761f51bd2979d;hb=8bcbf5c32f8091f2d5871e7eec4d4727c26d5c63;hp=a555a1795fd25d4aaea6a3e69e0057edbe661b19;hpb=8fce85002e6f6a5957dc95662c6a3d80fcce8e82;p=jalview.git diff --git a/src/jalview/datamodel/ContactMapHolder.java b/src/jalview/datamodel/ContactMapHolder.java index a555a17..af083dd 100644 --- 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 jalview.ws.datamodel.MappableContactMatrixI; + public class ContactMapHolder implements ContactMapHolderI { @@ -28,6 +30,14 @@ public class ContactMapHolder implements ContactMapHolderI { 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 @@ -49,9 +59,9 @@ public class ContactMapHolder implements ContactMapHolderI 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; } @@ -72,8 +82,15 @@ public class ContactMapHolder implements ContactMapHolderI 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); } }