in reply to Re^2: Increasing the efficiency of a viral clonal expansion model
in thread Increasing the efficiency of a viral clonal expansion model

Why are you chomping individual characters?

my @nucleotide_array = split //, $seq_string; foreach my $nucleotide ( @nucleotide_array ) { chomp $nucleotide;

It may do no harm to the algorithmm, but calling a function millions of times to do nothing is just silly. Especially when you are concerned with performance.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^4: Increasing the efficiency of a viral clonal expansion model
by ZWcarp (Beadle) on Jul 06, 2011 at 19:34 UTC
    Yeah I suppose you're right. I just type it by habit. Good point!

      How much memory does the code you posted in the root post use when run with that seed sequence and 120 iterations? And how long does it take to run?


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        on a qrsh ~18G it takes about 20 minutes. When I can't get a node with that kind of memory its a few hours. I've been dividing up the iterations as separate qsubs which has been helping. Simplifying it to a right fischer model also greatly helps with speed..( constant population size) but this assumption has drawbacks in modeling true variation seen in pandemic outbreaks where you obviously don't have a constant population size.