JAL-974 - ensure annotation created in local sequence frame, not external accession...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 31 Aug 2012 10:19:13 +0000 (11:19 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 31 Aug 2012 10:19:13 +0000 (11:19 +0100)
src/jalview/ws/jws2/JabawsAlignCalcWorker.java

index 41c44e4..6d73da9 100644 (file)
@@ -523,8 +523,8 @@ public abstract class JabawsAlignCalcWorker extends AlignCalcWorker
     // annotation.setCalcId(calcId);
     AlignmentAnnotation annotation = alignViewport.getAlignment()
             .findOrCreateAnnotation(typeName, calcId, false, dseq, null);
-    constructAnnotationFromScore(annotation, base, dseq.getLength(), scr);
-    annotation.createSequenceMapping(dseq, dseq.findPosition(base), false);
+    constructAnnotationFromScore(annotation, 0, dseq.getLength(), scr);
+    annotation.createSequenceMapping(dseq, base, false);
     annotation.adjustForAlignment();
     dseq.addAlignmentAnnotation(annotation);
     ourAnnot.add(annotation);
@@ -537,7 +537,7 @@ public abstract class JabawsAlignCalcWorker extends AlignCalcWorker
     Annotation[] elm = new Annotation[alWidth];
     Iterator<Float> vals = scr.getScores().iterator();
     float m = 0f, x = 0f;
-    for (int i = base; vals.hasNext(); i++)
+    for (int i = 0; vals.hasNext(); i++)
     {
       float val = vals.next().floatValue();
       if (i == 0)