From: tcofoegbu Date: Fri, 4 Nov 2016 15:30:28 +0000 (+0000) Subject: JAL-2292 fix for wrong mapping output in sequence mapping output window where sequenc... X-Git-Tag: Release_2_10_1^2~14 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1e943acf589b7393c666204f533d2ebce28d7471;p=jalview.git JAL-2292 fix for wrong mapping output in sequence mapping output window where sequence residue has different case with structure residue --- 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)))) {