@@ -885,7 +885,6 @@ def __init__(
885885 gene_conversion_length = 1 ,
886886 discrete_genome = True ,
887887 hull_offset = None ,
888- stop_at_local_mrca = True ,
889888 ):
890889 # Must be a square matrix.
891890 N = len (migration_matrix )
@@ -907,7 +906,6 @@ def __init__(
907906 self .migration_matrix = migration_matrix
908907 self .num_labels = num_labels
909908 self .num_populations = N
910- self .stop_at_local_mrca = stop_at_local_mrca
911909 self .max_segments = max_segments
912910 self .coalescing_segments_only = coalescing_segments_only
913911 self .additional_nodes = msprime .NodeType (additional_nodes )
@@ -1255,7 +1253,7 @@ def simulate(self, end_time):
12551253 if self .model == "hudson" :
12561254 self .hudson_simulate (end_time )
12571255 elif self .model == "dtwf" :
1258- self .dtwf_simulate (end_time )
1256+ self .dtwf_simulate ()
12591257 elif self .model == "fixed_pedigree" :
12601258 self .pedigree_simulate ()
12611259 elif self .model == "single_sweep" :
@@ -1526,11 +1524,11 @@ def pedigree_simulate(self):
15261524 self .pedigree = Pedigree (self .tables )
15271525 self .dtwf_climb_pedigree ()
15281526
1529- def dtwf_simulate (self , end_time ):
1527+ def dtwf_simulate (self ):
15301528 """
15311529 Simulates the algorithm until all loci have coalesced.
15321530 """
1533- while self .ancestors_remain () and self . t < end_time :
1531+ while self .ancestors_remain ():
15341532 self .t += 1
15351533 self .verify ()
15361534 self .dtwf_generation ()
@@ -2396,7 +2394,6 @@ def merge_two_ancestors(self, population_index, label, x, y, u=-1):
23962394 new_lineage = self .alloc_lineage (None , population_index , label = label )
23972395 coalescence = False
23982396 defrag_required = False
2399- min_overlap = 0
24002397
24012398 while x is not None or y is not None :
24022399 alpha = None
@@ -2438,12 +2435,12 @@ def merge_two_ancestors(self, population_index, label, x, y, u=-1):
24382435 j = self .S .floor_key (r_max )
24392436 self .S [r_max ] = self .S [j ]
24402437 # Update the number of extant segments.
2441- if self .S [left ] == min_overlap :
2438+ if self .S [left ] == 2 :
24422439 self .S [left ] = 0
24432440 right = self .S .succ_key (left )
24442441 else :
24452442 right = left
2446- while right < r_max and self .S [right ] != min_overlap :
2443+ while right < r_max and self .S [right ] != 2 :
24472444 self .S [right ] -= 1
24482445 right = self .S .succ_key (right )
24492446 alpha = self .alloc_segment (
@@ -2863,7 +2860,6 @@ def run_simulate(args):
28632860 gene_conversion_length = mean_tract_length ,
28642861 discrete_genome = args .discrete ,
28652862 hull_offset = args .offset ,
2866- stop_at_local_mrca = args .stop_at_local_mrca ,
28672863 )
28682864 ts = s .simulate (args .end_time )
28692865 ts .dump (args .output_file )
@@ -2950,7 +2946,6 @@ def add_simulator_arguments(parser):
29502946 help = "The delta_t value for selective sweeps" ,
29512947 )
29522948 parser .add_argument ("--model" , default = "hudson" )
2953- parser .add_argument ("--stop-at-local-mrca" , default = True , type = bool )
29542949 parser .add_argument ("--offset" , type = float , default = 0.0 )
29552950 parser .add_argument (
29562951 "--from-ts" ,
0 commit comments