To receive notifications about scheduled maintenance, please subscribe to the mailing-list You can subscribe to the mailing-list at

Commit 62411290 authored by Eva Bons's avatar Eva Bons

added a lognormal_ben_only model for the MFED

parent 6880fa07
from . import simulation
from . import GUI
from . import Scenarios
from . import binary_fission
#from . import GUI
#from . import Scenarios
#from . import binary_fission
......@@ -169,7 +169,8 @@ class Simulation(object):
Keyword Arguments:
model (str): model to use for the MFED (otions: 'neutral'(default),
'lognormal','exponential','spikes','beta', 'from_data','steps')
'lognormal','exponential','spikes','beta', 'from_data','steps',
parameters (dict): parameters for the MFED
mut_rate (float): mutation rate per site per generation (default = 2.16e-5)
subs_matrix (4x4 list): cumulative substitution matrix
......@@ -304,12 +305,14 @@ class Simulation(object):
if randnr < prob:
fitness[i, j] = self.settings['parameters']['loc'][spike]
elif self.settings['model'] == 'lognormal':
elif self.settings['model'] in ['lognormal','lognormal_ben_only']:
for i, j in zip(to_fill[0], to_fill[1]):
randnr = random.random()
if randnr > self.settings['parameters']['fl']:
fitness[i, j] = np.random.lognormal(self.settings['parameters']['mu'],
if self.settings['model'] == 'lognormal_ben_only':
fitness[fitness < 1] = 1
elif self.settings['model'] == 'beta':
randnr = random.random()
if randnr > self.settings['parameters']['fl']:
......@@ -26,10 +26,10 @@ setup(
author='Eva Bons',
packages=find_packages(exclude=['contrib', 'docs', 'Tests']),
packages=find_packages('.',exclude=['contrib', 'docs', 'Tests']),
'SeqSimEvo': ['simulation_settings/*','Scenarios/settings_files/*']
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment