Closed
Description
I think this should produce a table with edges spanning 0..2, but instead, the union
ed TS is missing 0..1
import tskit
import numpy as np
ts = tskit.Tree.generate_comb(2, span=2).tree_sequence
# Cut it up
ts1 = ts.keep_intervals([[0, 1]])
ts2 = ts.delete_intervals([[0, 1]])
node_mapping = np.arange(ts.num_nodes)
# Paste back together
ts_both = ts2.union(ts1, node_mapping=node_mapping, check_shared_equality=False)
ts_edges_squashed = ts_both.simplify()
print(ts_both.draw_text())
assert ts.equals(ts_edges_squashed, ignore_provenance=True) # fails
Here's what the result of union
looks like
1.00┊ ┊ 2 ┊
┊ ┊ ┏┻┓ ┊
0.00┊ 0 1 ┊ 0 1 ┊
0 1 2
Metadata
Metadata
Assignees
Labels
No labels