home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / apps / science / clustalv / gcgcheck.c < prev    next >
C/C++ Source or Header  |  1993-04-11  |  315b  |  17 lines

  1. #include <ctype.h>   /* because of toupper() */
  2.  
  3. int SeqGCGCheckSum(char *, int);
  4.  
  5.  
  6. int SeqGCGCheckSum(char *seq, int len)
  7. {
  8.     int  i;
  9.         long check;
  10.         
  11.         for( i=0, check=0; i< len; i++,seq++)
  12.                 check += ((i % 57)+1) * toupper(*seq);
  13.  
  14.         return(check % 10000);
  15. }
  16.  
  17.