From 1e943acf589b7393c666204f533d2ebce28d7471 Mon Sep 17 00:00:00 2001 From: tcofoegbu Date: Fri, 4 Nov 2016 15:30:28 +0000 Subject: [PATCH] JAL-2292 fix for wrong mapping output in sequence mapping output window where sequence residue has different case with structure residue --- src/jalview/analysis/AlignSeq.java | 5 ++++- src/jalview/ws/sifts/SiftsClient.java | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/jalview/analysis/AlignSeq.java b/src/jalview/analysis/AlignSeq.java index 3ad3188..f7e8f2e 100755 --- a/src/jalview/analysis/AlignSeq.java +++ b/src/jalview/analysis/AlignSeq.java @@ -620,7 +620,10 @@ public class AlignSeq { if ((i + (j * len)) < astr1.length()) { - if (astr1.charAt(i + (j * len)) == astr2.charAt(i + (j * len)) + boolean sameChar = Comparison.compareChars( + astr1.charAt(i + (j * len)), astr2.charAt(i + (j * len)), + false); + if (sameChar && !jalview.util.Comparison.isGap(astr1.charAt(i + (j * len)))) { diff --git a/src/jalview/ws/sifts/SiftsClient.java b/src/jalview/ws/sifts/SiftsClient.java index 83af0e0..2afcfe4 100644 --- a/src/jalview/ws/sifts/SiftsClient.java +++ b/src/jalview/ws/sifts/SiftsClient.java @@ -29,6 +29,7 @@ import jalview.datamodel.SequenceI; import jalview.io.StructureFile; import jalview.schemes.ResidueProperties; import jalview.structure.StructureMapping; +import jalview.util.Comparison; import jalview.util.DBRefUtils; import jalview.util.Format; import jalview.xml.binding.sifts.Entry; @@ -1004,8 +1005,10 @@ public class SiftsClient implements SiftsClientI { if ((i + (j * len)) < seqRes.length()) { - if (seqRes.charAt(i + (j * len)) == strRes - .charAt(i + (j * len)) + boolean sameChar = Comparison.compareChars( + seqRes.charAt(i + (j * len)), + strRes.charAt(i + (j * len)), false); + if (sameChar && !jalview.util.Comparison.isGap(seqRes.charAt(i + (j * len)))) { -- 1.7.10.2