From: Jim Procter Date: Wed, 12 Nov 2014 12:39:50 +0000 (+0000) Subject: JAL-674 patch broken getMapping function X-Git-Tag: Release_2_8_2b1^2~36^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=99b68710784bd85a781b5d157f34691fc7beacce;p=jalview.git JAL-674 patch broken getMapping function --- diff --git a/src/jalview/analysis/AlignSeq.java b/src/jalview/analysis/AlignSeq.java index c546310..307a06f 100755 --- a/src/jalview/analysis/AlignSeq.java +++ b/src/jalview/analysis/AlignSeq.java @@ -1020,22 +1020,29 @@ public class AlignSeq if (allowmismatch || c1 == c2) { - lastmatch = true; - // extend mapping interval. + // extend mapping interval if (lp1 + 1 != alignpos || lp2 + 1 != pdbpos) { as1.add(Integer.valueOf(alignpos)); as2.add(Integer.valueOf(pdbpos)); } + lastmatch = true; lp1 = alignpos; lp2 = pdbpos; } else { + // extend mapping interval + if (lastmatch) + { + as1.add(Integer.valueOf(lp1)); + as2.add(Integer.valueOf(lp2)); + } lastmatch = false; } } // construct range pairs + int[] mapseq1 = new int[as1.size() + (lastmatch ? 1 : 0)], mapseq2 = new int[as2 .size() + (lastmatch ? 1 : 0)]; int i = 0;