[Biojava-l] GCG checkSums
Russell Smithies
russell_smithies@hotmail.com
Tue, 29 Jan 2002 19:54:49
Don't panic, I found it :-)
Here's my version:
-------------------------------------------------
int GCG_Checksum(String seq){
int count = 0,
check = 0;
for(int i = 0; i < seq.length(); i++) {
count++;
check += count * seq.toUpperCase().charAt(i);
if(count == 57)count = 0;
}
return check %= 10000;
}
---------------------------------------------------
Russell Smithies
University of Otago
Dunedin
New Zealand
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com