You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: metapypulation/simulation.py
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,8 @@ class Simulation():
27
27
measure_timing (int): Number of generations between measurements.
28
28
verbose (bool): Whether to print text during the simulation.
29
29
verbose_timing (int): Number of generations between each print statement.
30
-
migration_matrix (str | np.ndarray): Type of migration topology.
30
+
migration_matrix (str | np.ndarray): Type of migration topology ('island' or 'stepping stone'), or matrix of migrations between demes.
31
+
mutation_rate (float): Probability of a mutation to occur during copying.
31
32
subpop_set_counts (pd.DataFrame): Collects the number of unique set counts per subpopulation averaged over subpopulations.
32
33
subpop_shannon (pd.DataFrame): Collects the Shannon diversity index per subpopulation averaged over subpopulations.
33
34
metapop_set_counts (pd.DataFrame): Collects the number of unique set counts over the whole metapopulation.
@@ -43,6 +44,7 @@ def __init__(self,
43
44
output_path: str,
44
45
burn_in: int=0,
45
46
migration_rate: float=0.001,
47
+
mutation_rate: float=0.0,
46
48
measure_timing: int=100,
47
49
verbose: bool=True,
48
50
verbose_timing: int=10000):
@@ -59,6 +61,7 @@ def __init__(self,
59
61
output_path (str): Path of folder in which to save results. TODO Creates new folder if it does not exist.
60
62
burn_in (int): Number of generations without migration in the beginning of the simulation. Defaults to 0.
61
63
migration_rate (float): Migration rate between 0 and 1 used to generate a migration matrix when there is str input. Used only in the function `create_migration_table()`.
64
+
mutation_rate (float): Probability of a mutation to occur during copying. Defaults to 0.0.
62
65
measure_timing (int, optional): Number of generations between measurements. Defaults to 100.
63
66
verbose (bool, optional): Whether to print text during the simulation. Defaults to True.
64
67
verbose_timing (int, optional): Number of generations between each print statement. Defaults to 10000.
0 commit comments