*/\r
public class AlignmentAnnotation\r
{\r
- public SequenceI refSequence;\r
+ public SequenceI sequenceRef;\r
+\r
+ /** This annotation is the original loaded annotation\r
+ * without any gaps. It is necessary to adjust the annotation\r
+ * if sequences are updated */\r
+ public AlignmentAnnotation datasetAnnotation;\r
\r
/** DOCUMENT ME!! */\r
public String label;\r
if(graphLines==null)\r
graphLines = new java.util.Vector();\r
\r
- graphLines.add(line);\r
+ graphLines.addElement(line);\r
}\r
\r
public GraphLine getGraphLine(int index)\r
else\r
return null;\r
}\r
+\r
+ public void adjustForAlignment()\r
+ {\r
+ int a=0, aSize = sequenceRef.getLength();\r
+\r
+ int index = 0;\r
+ Annotation[] temp = new Annotation[aSize];\r
+\r
+ for (a = 0; a < aSize; a++)\r
+ {\r
+ if (!jalview.util.Comparison.isGap(sequenceRef.getCharAt(a)))\r
+ {\r
+ index = sequenceRef.findPosition(a);\r
+ if(datasetAnnotation.annotations.length>index)\r
+ temp[a] = datasetAnnotation.annotations[index];\r
+ }\r
+ }\r
+\r
+ annotations = temp;\r
+ }\r
}\r
\r
\r