Skip to content

How do I efficiently find the node *above* a mutation #3068

Closed Answered by hyanwong
hyanwong asked this question in Q&A
Discussion options

You must be logged in to vote

We now have a mutation.edge attribute, so you can obtain the parent node very simply, without having to build the tree:

mutation = ts.mutation(100)
node_time_below_mutation = ts.nodes_time[mutation.node]
node_time_above_mutation = ts.nodes_time[ts.edges_parent[mutation.edge]]

Replies: 1 comment

Comment options

hyanwong
Dec 5, 2024
Maintainer Author

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