+ if (annot==null) {\r
+ annot = new Annotation(annotations[is[p]]);\r
+ contrib = 1;\r
+ } else {\r
+ // merge with last\r
+ Annotation cpy = new Annotation(annotations[is[p]]);\r
+ if (annot.colour==null)\r
+ {\r
+ annot.colour = cpy.colour;\r
+ }\r
+ if (annot.description==null || annot.description.length()==0)\r
+ {\r
+ annot.description = cpy.description;\r
+ }\r
+ if (annot.displayCharacter==null)\r
+ {\r
+ annot.displayCharacter = cpy.displayCharacter;\r
+ }\r
+ if (annot.secondaryStructure==0)\r
+ {\r
+ annot.secondaryStructure = cpy.secondaryStructure;\r
+ }\r
+ annot.value+=cpy.value;\r
+ contrib++;\r
+ }\r