[Biojava-l] RE: Biojava-l digest, Vol 1 #546 - 4 msgs
Russell Smithies
russell.smithies@xtra.co.nz
Sat, 2 Feb 2002 13:12:37 +1300
Hi Thomas,
The check sum is only applied to the sequence.
The .rsf file format allows for detailed annotation of sequence data but
doesn't factor in when check sums are calculated.
As to where this method might live in the API structure and if it should be
added, I think I should leave it up to those who use the packages more.
I pick bits of code out occasionally but haven't had the opportunity to use
it "correctly" yet.
Russell
>
> Message: 3
> Date: Thu, 31 Jan 2002 11:56:58 +0000
> From: Thomas Down <td2@sanger.ac.uk>
> To: Russell Smithies <russell_smithies@hotmail.com>
> Cc: biojava-l@biojava.org
> Subject: Re: [Biojava-l] GCG checkSums
> Organization: This tangled web on which I'm laid intwined
>
> On Tue, Jan 29, 2002 at 07:54:49PM +0000, Russell Smithies wrote:
> > 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;
> > }
> >
> > ---------------------------------------------------
>
> That looks sensible. Do you want to see it included
> in the BioJava package? If so, could you suggest a
> location within the API structure?
>
> I'm not familiar with how GCG checksums are used in
> practice. Are they applied just to sequence data, or
> to complete (and perhaps annotated) sequence database
> entries?
>
> Thomas.
>
> End of Biojava-l Digest