Skip to content

new tskit release breaks something here #11

@petrelharp

Description

@petrelharp

Running get_pop_ancestry with the beta release for tskit gets:

> anc = tspop.get_pop_ancestry(tss,census_time=2)
... 
Traceback (most recent call last):
  File "<python-input-7>", line 9, in <module>
    anc = tspop.get_pop_ancestry(tss,census_time=2)
  File "/home/peter/projects/tskit-dev/tsvenv/lib/python3.13/site-packages/tspop.py", line 22, in get_pop_ancestry
    pop_table = __replace_parents_with_pops(ts, census_nodes)
  File "/home/peter/projects/tskit-dev/tsvenv/lib/python3.13/site-packages/tspop.py", line 30, in __replace_parents_with_pops
    ancestor_table = ts.tables.link_ancestors(
                     ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/peter/projects/tskit-dev/tsvenv/lib/python3.13/site-packages/tskit/tables.py", line 4817, in __getattr__
    raise ImmutableTableError(
    ...<2 lines>...
    )
tskit.exceptions.ImmutableTableError: Cannot call link_ancestors() on immutable table collection. Use TreeSequence.dump_tables() for mutable copy.

See tskit-dev/tskit#3288 for what's going on here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions