Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Do you care about the individual nodes, or just each current genome sequence (not a geneticist, so pardon any terminology mess-ups) and the number of each in existence?

You are dealing with large numbers of values at the mutation rates and generations in your example. As was previously mentioned, 5**1000 is quite large. Is there any dieoff rate or fitness test at each generation that could be used to prune the dataset?

Perhaps a more manageable structure (although not at these rates and generations) would be a Hash or HoH (hash-of-hashes), where each key is the ACTG sequence, and the value is a hash with the current number of virii with that sequence, as well as some other bookkeeping information. If you don't need other bookkeeping information, perhaps a simple hash would do. Worst storage case on this (if I am thinking through this correctly) should be no worse (given a scaling factor) than an array of all of the virii (not that this value is small). If each mutation must work in groups of 3 ACGT values, perhaps you could even store your string as a bitstring of some sort (4**3 == 64).

Death of a virus would be a -- operation, and a successful mutation would be a ++ operation.


In reply to Re: Virus toy model by MidLifeXis
in thread Virus toy model^2 by ZWcarp

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2022-01-19 20:30 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (55 votes). Check out past polls.