From 99b68710784bd85a781b5d157f34691fc7beacce Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Wed, 12 Nov 2014 12:39:50 +0000 Subject: [PATCH] JAL-674 patch broken getMapping function --- src/jalview/analysis/AlignSeq.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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; -- 1.7.10.2