Mendel's Accountant

After seeing Sanford’s repeated references to Mendel’s Accountant software, I did a little digging to see what other thought of it. The biggest direct criticism I can make, is that hardly anyone publishing in mainstream journals is using it, and there is probably a reason for that. Some of the criticisms I found were:

  1. maximum population size of 1000.
  2. No allowance for multiple fitnesses, or very difficult to use this way.
  3. Program ends if “too many” positive mutations occur.
  4. Does not allow fitness increase in the population even when parameter are set to be extremely favorable.
  5. Doesn’t match results that can be easily demonstrated with in-vivo experiments.

Relevant links follow:

Considerable discussion here:

Ten years old, so perhaps outdated?

ETA: @davecarlson suggested a better alternative in another thread: Is Failure and Unsuccess also part of Natural Selection?

5 Likes

Hmm.

Hmmmmmmm.

Well, we already knew that.

6 Likes

If others are bored and wanting to go digging, I would recommend starting with the way selection is handled by the algorithm. It is a curious thing.

3 Likes

I have never seen Mendel’s Accountant used to reproduce the curve of relative fitness-gains observed in the LTEE using what Sanford thinks is a realistic DFE of mutations, and the mutation rate for E coli. I’ve tried but couldn’t get the program to run with realistic values. When I tried lowering population size to even make it run, I didn’t see any sustained fitness gains.

Does anyone know of any publication where Sanford shows a curve of fitness gains similar to this one:

-in his MA program when simulating the LTEE using his own DFE of mutations? I just can’t get the damn program to make such a curve of relative fitness gains using Sanford’s DFE.

7 Likes

I’ve told this story before but one of the funniest things to do with Mendel’s Accountant is to start with a population of 8 humans (i.e the Ark’s Flood survivors). No matter what parameters you enter the humans always go extinct in just a few hundred years tops. Oops! :rofl:

13 Likes

Just tagging @PDPrice so he can add his expertise to this discussion.

That’s a story that cannot be told too many times.

Mendel’s Accountant was specifically written to “verify” GE by having populations always go extinct no matter what starting parameters are used. :roll_eyes: That would be me like writing a “realistic flight simulator” program to show heavier-than-air flight is impossible. Then I would code it so no matter what lift / thrust / weight / drag parameters are entered the simulated aircraft always nose dives into the ground. To really emulate how MA is used I’d then have to show my program to a convention of pilots and flight engineers, being held at an airport, with planes constantly taking off and flying overhead, and go “SEE! This program PROVES heavier-than-air flight is IMPOSSIBLE!” :grin:

6 Likes

Is it a different program than what’s available or are you inputting wrong, since they’ve already done that:

We tested various historical models and their expected allele
frequency patterns using Mendel version 2.7.2 and Mendel-Go.
As stated in the introduction, Mendel tracks the coming and going
of virtual alleles that exist in a virtual population, accounts for
enormous numbers of genetic transactions that take place over
many generations, and tallies and plots final outcomes, including
allele frequency distributions.

The modified Mendel program (version 2.7.2) required a new
dynamic population size function, so that special experiments could
be conducted where population size was dynamically changing.
At the same time, an entirely restructured program (Mendel-Go)
was developed. This was used to validate the output of the original
> Mendel simulator. These improvements enabled such things as
> initially created alleles, normal mutation accumulation, a small
> founder population, population growth, a population bottleneck,
> and population re-growth. Modifications were made so that the
changing allele frequencies in the dynamic population could still
be tracked across generations. At the end of the experiment, the
final allele frequency distribution could be plotted and compared
to actual allele frequency distributions seen in today’s human
population

https://digitalcommons.cedarville.edu/cgi/viewcontent.cgi?article=1079&context=icc_proceedings

IIRC the fitness decrease caused by a detrimental mutation was set to be 1000 times the fitness increase of a beneficial mutation, making maintaining the same level of fitness impossible.

(I wrote a short critique a few years back - I’ll see if I can find it later).

4 Likes

You can make it generate fitness gains, you just have to make beneficial mutations outweigh deleterious mutations by a factor of ~99+:1, and make every beneficial mutation grant a 10% fitness advantage (comparable to lactase persistence in humans, one of the most advantageous mutations documented).

Under such scenarios the fitness gains are…modest. Like, 4-7 fold over default fitness, which seems low for a progeny generation carrying 50,000+ beneficial mutations.

Later iterations (Mendel 2.0.2) seem to actually abort the sim if favourable mutations get above a certain threshold, and it’s not a very high threshold.

9 Likes

Seriously? Can you show the check in the code?

2 Likes

Hi Joshua,
I don’t know if Mendel’s accountant is open source (I suspect not), and I also doubt I’d have the code-fu to give it the critique it deserves even if so, but my original testing of 2.0.2 is reported here:


The software is free to download (Mendel’s Accountant download | SourceForge.net), so you can test it yourself (though it does very odd stuff with an external server, for…reasons, so I uninstalled it), but the error message was definitely a feature that terminated the sim, and terminated it earlier the greater the fraction of favourable mutations you selected.

Any model of mutational accumulation that includes a halt error message of “Favorable mutation count exceeds limit” is slightly concerning.

5 Likes

The source code for Mendel’s Accountant is here:

There’s also a version in the Go programming language here:

4 Likes

That it’s written in Fortran 90 is not a good start…

2 Likes

@jammycakes, do you see anything that supports this claim in the code?

@Sweary_Biochemist, can you give an example configuration file that replicates this behavior?

mating.f90::

  ! Track this mutation if its fitness effect exceeds the value 
  ! of tracking_threshold or if track_neutrals is true. 
  
  if(fitness_effect>tracking_threshold .or. track_neutrals) then
     
     if(mutn_type == fav) then
        
        ! Test to see if the storage limit of array fmutn_offsprng 
        ! has been exceeded.  (Note that we are using the first  
        ! slot to hold the actual mutation count.)
        
        num_mutn = fmutn_offsprng(1,hap_id) + 1 
        
        if(num_mutn + 1 > max_fav_mutn_per_indiv/2) then
           write(6,*) 'Favorable mutation count exceeds limit'
           write(9,*) 'Favorable mutation count exceeds limit'
           stop
        end if
9 Likes

What value is tracking_threshold? Where is it set? Is it hard coded or configurable? What is the documentation on the setting?

1 Like

I tried the latest version available a few weeks ago, and tried to get it to “simulate” the LTEE using the values Sanford used in his own “simulations” of the LTEE, which we can find very poorly specified here in this pdf.

Basically the only settings I could find are those specified in the legend to this figure:

Now notice something curious about this figure? Unlike the figure from the LTEE, Sanford’s doesn’t have fitness on the y-axis. It only has total number of mutations.
Sanford compares, as we can read in the legend, that figure with this figure from the actual LTEE:

He then spends time arguing that his simulation of the LTEE is accurate, because he’s able to reproduce the accumulation of mutations as a function of the mutation rate and number of generations.

This is of course trivial. What would be much more interesting is if Sanford can use his assumed DFE to reproduce the fitness gains of the LTEE. So I downloaded his latest MA program and tried to run it with the values specified above. I didn’t get a screenshot because it looked so absurd I just uninstalled and deleted the program again, but here’s how it basically looked:


I apologize in advance for the poor mspaint drawing, took me 10 seconds to make, but I can’t be bothered reinstalling his crappy software.

I don’t know how to describe this and I don’t understand how I could get a plot of fitness that looks like that. It sort of looks like when a new strongly beneficial mutation occurs, it suddenly jumps to fixation, but then the population immediately and quickly decays back down to very low fitness without going extinct. Makes no sense.

1 Like

You will need to reinstall and rerun it. Your mspaint-recollection is not a fair sort of criticism. I suggest you put down the configuration settings as clearly as you would expect Sanford to do so too.

4 Likes