X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationPanel.java;fp=src%2Fjalview%2Fgui%2FAnnotationPanel.java;h=b68ff01d7ca6703c743a4509b45dbb2b5d96dd14;hb=8b5145f0837eeaeb1f029de179a3715a174dfa09;hp=e146754bdb7c3a2fa0d50f90bdab25564c6983db;hpb=969fe2931a113706ddd06888213c8f71f546d325;p=jalview.git diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index e146754..b68ff01 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -70,6 +70,7 @@ import jalview.util.MessageManager; import jalview.util.Platform; import jalview.viewmodel.ViewportListenerI; import jalview.viewmodel.ViewportRanges; +import jalview.ws.datamodel.alphafold.PAEContactMatrix; /** * AnnotationPanel displays visible portion of annotation rows below unwrapped @@ -589,8 +590,9 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, if (graphStretch != -1) { - if (aa[graphStretch].graph == AlignmentAnnotation.CUSTOMRENDERER) + if (aa[graphStretch].graph == AlignmentAnnotation.CONTACT_MAP) { + // data in row has position on y as well as x axis if (evt.isAltDown() || evt.isAltGraphDown()) { dragMode = DragMode.MatrixSelect; @@ -620,17 +622,23 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, } av.getColumnSelection().addElement(currentX); } + // PAE SPECIFIC // and also select everything lower than the max range adjacent // (kind of works) + if (PAEContactMatrix.PAEMATRIX.equals(aa[graphStretch].getCalcId())) { int c = fr - 1; ContactRange cr = forCurrentX.getRangeFor(fr, to); double cval; + // TODO: could use GraphLine instead of arbitrary picking + // TODO: could report mean/median/variance for partitions (contiguous selected vs unselected regions and inter-contig regions) + // controls feathering - what other elements in row/column should we select + double thresh=cr.getMean()+(cr.getMax()-cr.getMean())*.15; while (c > 0) { cval = forCurrentX.getContactAt(c); if (// cr.getMin() <= cval && - cval <= cr.getMax()) + cval <= thresh) { av.getColumnSelection().addElement(c--); } @@ -644,7 +652,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, { cval = forCurrentX.getContactAt(c); if (// cr.getMin() <= cval && - cval <= cr.getMax()) + cval <= thresh) { av.getColumnSelection().addElement(c++); } @@ -823,7 +831,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, * but could also be a matrix drag */ if ((evt.isAltDown() || evt.isAltGraphDown()) && (av.getAlignment() - .getAlignmentAnnotation()[graphStretch].graph == AlignmentAnnotation.CUSTOMRENDERER)) + .getAlignmentAnnotation()[graphStretch].graph == AlignmentAnnotation.CONTACT_MAP)) { /* * dragging in a matrix @@ -1146,7 +1154,7 @@ public class AnnotationPanel extends JPanel implements AwtRenderPanelI, tooltip = ann.annotations[column].description; } // TODO abstract tooltip generator so different implementations can be built - if (ann.graph == AlignmentAnnotation.CUSTOMRENDERER) + if (ann.graph == AlignmentAnnotation.CONTACT_MAP) { ContactListI clist = av.getContactList(ann, column); if (clist != null)