Mendel's Accountant

Yeah. I was trying to understand what was going on–but it’s spaghetti code, either by design or simply by poor version control management. This is the first time I looked at the code for MA–didn’t even know it was opensource. Some of the default parameters look quite strange to me from a biological perspective:

#inputs.f90
max_fav_fitness_gain = 0.01
fitness_dependent_fertility = .false.
max_fav_mutn_per_indiv = 10000

#medel.in
&computation
tracking_threshold = 0.0
extinction_threshold = 0.0
max_del_mutn_per_indiv = 10000
max_neu_mutn_per_indiv = 100
max_fav_mutn_per_indiv = 100
random_number_seed = 42
reseed_rng = F
write_dump = F
write_vcf = F
restart_case = F
restart_dump_number = 0
plot_allele_gens = 25
global_allele_analysis = T
verbosity = 1
data_file_path = ‘./’
/

It looks like there are just flat limits to the number of beneficial and neutral mutations even possible? It’s hard to tell from the variable naming, but I’m very curious about this:

fitness_dependent_fertility = .false.

It seems this block of code will run if mutational tracking is enabled and the number of offspring with favorable mutations exceeds half the hard limit–which looks like defaults to either 10000 or 100?

Basically, if any two offspring in the simulation could mate to produce an F1 with greater than the parameter max_fav_mutn_per_indiv, the program stops. lol, seems legit?

[Edit]: Just to add, this same if-then evaluation also exists for deleterious mutations, but it does seem the value max_del_mutn_per_indiv is set to much higher.

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
1 Like