From ee45bdff826bb8c24270730d2de27b475b304472 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 29 Sep 2016 11:58:24 +0100 Subject: [PATCH] =?utf8?q?JAL-2236=20include=20associated=20sequence=20id=20?= =?utf8?q?for=20annotation=E2=80=99s=20label=20in=20filter/select=20combobox?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/jalview/appletgui/AnnotationRowFilter.java | 10 ++++++++++ src/jalview/gui/AnnotationRowFilter.java | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/jalview/appletgui/AnnotationRowFilter.java b/src/jalview/appletgui/AnnotationRowFilter.java index fc49de5..cd00fcf 100644 --- a/src/jalview/appletgui/AnnotationRowFilter.java +++ b/src/jalview/appletgui/AnnotationRowFilter.java @@ -104,6 +104,16 @@ public abstract class AnnotationRowFilter extends Panel enableSeqAss = true; } String label = av.getAlignment().getAlignmentAnnotation()[i].label; + // add associated sequence ID if available + if (!isSeqAssociated + && av.getAlignment().getAlignmentAnnotation()[i].sequenceRef != null) + { + label = label + + "_" + + av.getAlignment().getAlignmentAnnotation()[i].sequenceRef + .getName(); + } + // make label unique if (!list.contains(label)) { anmap[list.size()] = i; diff --git a/src/jalview/gui/AnnotationRowFilter.java b/src/jalview/gui/AnnotationRowFilter.java index f0bea60..0a5e96c 100644 --- a/src/jalview/gui/AnnotationRowFilter.java +++ b/src/jalview/gui/AnnotationRowFilter.java @@ -161,6 +161,16 @@ public abstract class AnnotationRowFilter extends JPanel enableSeqAss = true; } String label = av.getAlignment().getAlignmentAnnotation()[i].label; + // add associated sequence ID if available + if (!isSeqAssociated + && av.getAlignment().getAlignmentAnnotation()[i].sequenceRef != null) + { + label = label + + "_" + + av.getAlignment().getAlignmentAnnotation()[i].sequenceRef + .getName(); + } + // make label unique if (!list.contains(label)) { anmap[list.size()] = i; -- 1.7.10.2