Hello! I'm not supposed to think about PHP for a week, much less write right now... but I just have to say my THANKS to Frankie. Be back on Saturday... till then happy coding! Cheers! Serge Frankie wrote: --------------------------------------- On Sun, 18 May 2003 19:15:32 apu wrote: >Hello there, > >first of all: sorry! i had some rather unpleasant real life stuff to >attend to, thats why i didnt write anything within a week. > >Thursday, May 8, 2003, 9:17:22 PM, you wrote: > >SG> Write a function that returns the SCORE based on the ff. matrix >SG> for example: >SG> string A = "S E R G E" >SG> string B = "F R A N K" >SG> -2 0 -1 0 1 = -2 => FINAL SCORE >SG>[...] >D'oh! misunderstood the problem at first, this should be quite easy.. > >SG> Or you could use associative keys, e.g. >SG> ( A => ( (A, 4), (R, -1), ... ) ) >Did that since its easier for any function to access the values just >by doing matrix["A"]["Q"], then looking up indexes first. > >SG> Of course, the next step is a function that handles strings of >SG> unequal length, but we'll get to that later. >and alignment i guess. ill read myself through the website myabe i can >figure out some stuff ;) > >attached is a bit of code that returns the score based on a matrix. >i finished 2 matrices (blosum62 and PAM250) from the site you >referred to. but didnt check them for errors, yet. > > >-- >Best regards, > frank mailto:asseg@ukl.uni-freiburg.de Need a new email address that people can remember Check out the new EudoraMail at http://www.eudoramail.com