Open
Description
As discovered in #3168, union
is a node-wise union (not edge-wise) and so is not functioning how we imagined it was in implementing concatenate
. For instance, the following fails:
t = tskit.TableCollection(sequence_length=2.0)
p = t.nodes.add_row(time=1, flags=1)
for _ in range(2):
c = t.nodes.add_row(time=0, flags=1)
t.edges.add_row(parent=p, child=c, left=0, right=2)
ts = t.tree_sequence()
ts1 = ts.keep_intervals([[0, 1]]).trim()
ts2 = ts.keep_intervals([[1, 2]]).trim()
cts = ts1.concatenate(ts2).simplify()
cts.tables.assert_equals(ts.tables, ignore_provenance=True)
Indeed,
>>> print(cts.draw_text())
1.00┊ 0 ┊ 0 ┊
┊ ┏┻┓ ┊ ┊
0.00┊ 1 2 ┊ 1 2 ┊
Passing in node_mappings
should also fail in many situations.