From: jprocter Date: Fri, 31 Aug 2012 10:19:13 +0000 (+0100) Subject: JAL-974 - ensure annotation created in local sequence frame, not external accession... X-Git-Tag: Jalview_2_9~369 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d10415f14ea6e2cbeba5d698e6162558d77281b1;p=jalview.git JAL-974 - ensure annotation created in local sequence frame, not external accession reference frame --- diff --git a/src/jalview/ws/jws2/JabawsAlignCalcWorker.java b/src/jalview/ws/jws2/JabawsAlignCalcWorker.java index 41c44e4..6d73da9 100644 --- a/src/jalview/ws/jws2/JabawsAlignCalcWorker.java +++ b/src/jalview/ws/jws2/JabawsAlignCalcWorker.java @@ -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 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)