Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: string mutation script behaving erraticaly

by zing (Beadle)
on Jun 25, 2012 at 22:15 UTC ( #978295=note: print w/ replies, xml ) Need Help??


in reply to Re: string mutation script behaving erraticaly
in thread string mutation script behaving erraticaly

choroba actually the hash named %nuc ( line 4) was supposed to be a PAM matrix but isnt properly ordered,coz if it were so then you would be looking at this matrix -------- http://homepages.rpi.edu/~zukerm/MATH-4961/scoring/img97.gif

.If you look at this figure, u can easily make out that in order to mutate the alphabet A (Ala) to R (Arg) the random number generated should be > 9867 but < 9869 (i.e. 9867+2) Similarly for A to N we need > 9867 but < 9878 (i.e. 9867+2+9). Thus we are doing a cumulative sum.

What I was trying to do with my code was that I was comparing the random number generated for an alphabet with the progressive cumulative sum for that corresponding alphabet in the %nuc. Now this comparison was done under a counter. For example if the random number generated was .9877,and the alphabet to be mutated is A,then the value of counter will be 3(see above). Now finally what I did was I collected these respective counters(numeric) for each of the alphabets. Then I tried converting them to alphabets based on their arrangements in the %nuc.

And this is where the code fails, because the hashes get jumbled up,they never behave in the same order I entered them.


Comment on Re^2: string mutation script behaving erraticaly
Re^3: string mutation script behaving erraticaly
by choroba (Abbot) on Jun 25, 2012 at 23:40 UTC
    Oh, I see. Then maybe this can help you: Update: bugfix.
      Christ !!!! What a forum and what an overflow of response... U guys are superb.... Just thied the bugfix its working like charm. Keep up the good work everybody. Congratulations on living up to your forums name.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://978295]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2014-07-29 23:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls