git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
we already have c defined
[jalview.git]
/
src
/
jalview
/
analysis
/
AlignSeq.java
diff --git
a/src/jalview/analysis/AlignSeq.java
b/src/jalview/analysis/AlignSeq.java
index
3c1f5be
..
0af85f1
100755
(executable)
--- a/
src/jalview/analysis/AlignSeq.java
+++ b/
src/jalview/analysis/AlignSeq.java
@@
-1,6
+1,6
@@
/*
\r
* Jalview - A Sequence Alignment Editor and Viewer
\r
/*
\r
* Jalview - A Sequence Alignment Editor and Viewer
\r
-* Copyright (C) 2005 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
+* Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
\r
*
\r
* This program is free software; you can redistribute it and/or
\r
* modify it under the terms of the GNU General Public License
\r
*
\r
* This program is free software; you can redistribute it and/or
\r
* modify it under the terms of the GNU General Public License
\r
@@
-751,17
+751,24
@@
public class AlignSeq
\r
for (int i = 0; i < s.length(); i++)
\r
{
\r
\r
for (int i = 0; i < s.length(); i++)
\r
{
\r
- String ss = s.substring(i, i + 1).toUpperCase();
\r
+ // String ss = s.substring(i, i + 1).toUpperCase();
\r
+ char c = s.charAt(i);
\r
+ if ('a' <= c && c <= 'z')
\r
+ {
\r
+ // TO UPPERCASE !!!
\r
+ c -= ('a' - 'A');
\r
+ }
\r
+
\r
\r
try
\r
{
\r
if (type.equals("pep"))
\r
{
\r
\r
try
\r
{
\r
if (type.equals("pep"))
\r
{
\r
- seq1[i] = ((Integer) ResidueProperties.aaHash.get(ss)).intValue();
\r
+ seq1[i] = ResidueProperties.aaIndex[c];
\r
}
\r
else if (type.equals("dna"))
\r
{
\r
}
\r
else if (type.equals("dna"))
\r
{
\r
- seq1[i] = ((Integer) dnaHash.get(ss)).intValue();
\r
+ seq1[i] = ResidueProperties.nucleotideIndex[c];
\r
}
\r
\r
if (seq1[i] > 23)
\r
}
\r
\r
if (seq1[i] > 23)
\r