From b21c79597152acf723a20743263171f7f566a00f Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 10 May 2007 08:42:35 +0000 Subject: [PATCH] ensure that only annotation referenced in given alignment is duplicated on returned sequence selection set --- src/jalview/datamodel/SequenceGroup.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/jalview/datamodel/SequenceGroup.java b/src/jalview/datamodel/SequenceGroup.java index 18fb53b..cdc6fed 100755 --- a/src/jalview/datamodel/SequenceGroup.java +++ b/src/jalview/datamodel/SequenceGroup.java @@ -111,8 +111,25 @@ public class SequenceGroup if (seq.getAnnotation() != null) { + AlignmentAnnotation[] alann = align.getAlignmentAnnotation(); + // Only copy annotation that is either a score or referenced by the alignment's annotation vector for (int a = 0; a < seq.getAnnotation().length; a++) { + AlignmentAnnotation tocopy = seq.getAnnotation()[a]; + if (alann!=null) + { + boolean found=false; + for (int pos=0;pos