Skip to content

getting a subset of node ids from tables #2289

Answered by benjeffery
alxsimon asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @alxsimon, thanks for the question.
The id of a row in tskit is just its index in the table, so they will change when you take a subset of the table. This saves storing an extra field in each table and also saves thorny id collision issues when manipulating tables. IDs aren't needed as you can use techniques such as your first example.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@alxsimon
Comment options

Answer selected by alxsimon
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants