@@ -1011,10 +1011,12 @@ def initialise(self, ts):
1011
1011
root_segments_tail [root ] = seg
1012
1012
self .S [self .L ] = - 1
1013
1013
1014
+ # FIXME should determine start_time from the youngest roots. See the C code.
1015
+ start_time = 0
1014
1016
# Insert the segment chains into the algorithm state.
1015
1017
for node in range (ts .num_nodes ):
1016
1018
lineage = root_lineages [node ]
1017
- if lineage is not None :
1019
+ if lineage is not None and ts . nodes_time [ node ] == start_time :
1018
1020
seg = lineage .head
1019
1021
left_end = seg .left
1020
1022
while seg is not None :
@@ -1617,6 +1619,7 @@ def process_pedigree_common_ancestors(self, ind, ploid):
1617
1619
material among its parent ploids.
1618
1620
"""
1619
1621
common_ancestors = ind .common_ancestors [ploid ]
1622
+ node = ind .nodes [ploid ]
1620
1623
if len (common_ancestors ) == 0 :
1621
1624
# No ancestral material inherited on this ploid of this individual
1622
1625
return
@@ -1632,7 +1635,6 @@ def process_pedigree_common_ancestors(self, ind, ploid):
1632
1635
# monoploid genome for this ploid of this individual.
1633
1636
# If any coalescences occur, they use the corresponding node ID.
1634
1637
# FIXME update the population/label here
1635
- node = ind .nodes [ploid ]
1636
1638
genome = self .merge_ancestors (common_ancestors , 0 , 0 , node )
1637
1639
if ind .parents [ploid ] == tskit .NULL :
1638
1640
# If this individual is a founder we need to make sure that all
0 commit comments