From a9108fa3538ddb2ef02aa231e233dc978654d6f6 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 23 Apr 2010 15:59:56 +0000 Subject: [PATCH] skips any annotation that appears to be identical to existing autogenerated annotation on the alignment. --- src/jalview/io/AnnotationFile.java | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/jalview/io/AnnotationFile.java b/src/jalview/io/AnnotationFile.java index 87b21d3..aac48eb 100755 --- a/src/jalview/io/AnnotationFile.java +++ b/src/jalview/io/AnnotationFile.java @@ -433,6 +433,7 @@ public class AnnotationFile public boolean readAnnotationFile(AlignmentI al, String file, String protocol) { + Hashtable autoAnnots=new Hashtable(); try { BufferedReader in = null; @@ -462,9 +463,24 @@ public class AnnotationFile int graphStyle, index; int refSeqIndex = 1; int existingAnnotations = 0; + // when true - will add new rows regardless of whether they are duplicate auto-annotation like consensus or conservation graphs + boolean overrideAutoAnnot=false; if (al.getAlignmentAnnotation() != null) { existingAnnotations = al.getAlignmentAnnotation().length; + if (existingAnnotations>0) + { + AlignmentAnnotation[] aa = al.getAlignmentAnnotation(); + for (int aai=0;aai