Replies: 2 comments
-
Wouldn't something like this do it? (i.e., just check if there's any non-sample nodes that aren't parents to any edge)
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I think if the definition is exactly your function above @hyanwong there's not much else that can be done, since this is finding the leaves reachable from roots that are not samples. It's hard to see how to do this exactly (in all the possible awkward corner cases) by looking at the edge table. A weaker definition could be done efficiently via something like @petrelharp has given above. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would find it useful to check whether a tree sequence has any leaf nodes that are not samples (i.e. "dangling" nodes). I guess I could do this by iterating over all the leaves of all the trees, but that's probably very slow for large tree sequences. There must be a more efficient way to do this by looking at the edge table (especially if we ignore the problem of "dead branches": topology linking nonsample nodes that is not connected to any root)
Beta Was this translation helpful? Give feedback.
All reactions