From: amwaterhouse Date: Wed, 6 Jul 2005 12:16:42 +0000 (+0000) Subject: Sequence to Uppercase before checksum X-Git-Tag: Release_2_01~25 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=13b2b876b5bc46693d881b4551842279158311f5;p=jalview.git Sequence to Uppercase before checksum --- diff --git a/src/jalview/io/PileUpfile.java b/src/jalview/io/PileUpfile.java index 1cb5b43..c200c5e 100755 --- a/src/jalview/io/PileUpfile.java +++ b/src/jalview/io/PileUpfile.java @@ -175,18 +175,20 @@ public class PileUpfile //String chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.*~&@"; int check = 0; + String sequence = seq.toUpperCase(); + String index = "--------------------------------------&---*---.-----------------@ABCDEFGHIJKLMNOPQRSTUVWXYZ------ABCDEFGHIJKLMNOPQRSTUVWXYZ----@"; index += "--------------------------------------------------------------------------------------------------------------------------------"; - for (int i = 0; i < seq.length(); i++) + for (int i = 0; i < sequence.length(); i++) { try { - if (i < seq.length()) + if (i < sequence.length()) { - int pos = index.indexOf(seq.substring(i, i + 1)); + int pos = index.indexOf(sequence.charAt(i)); - if (!index.substring(pos, pos + 1).equals("_")) + if (index.charAt(pos)!='_') { check += ( ( (i % 57) + 1) * pos); }