From d10415f14ea6e2cbeba5d698e6162558d77281b1 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 31 Aug 2012 11:19:13 +0100 Subject: [PATCH] JAL-974 - ensure annotation created in local sequence frame, not external accession reference frame --- src/jalview/ws/jws2/JabawsAlignCalcWorker.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 1.7.10.2