Replies: 3 comments 1 reply
-
|
@hyanwong the demo code is duplicated;) Thanks for sharing though;) |
Beta Was this translation helpful? Give feedback.
1 reply
-
Beta Was this translation helpful? Give feedback.
0 replies
-
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.
Uh oh!
There was an error while loading. Please reload this page.
-
In tests/tsutil.py, we have a function called "make_ancestors_ts". This is one way in which we can take an existing tree sequence (say from the unified genealogy) and match a new sample into it, without having the old ancestors_ts lying around. Using a (simplified) final tree sequence isn't quite as good as using the original, as various non-coalescent (unary or even non-ancestral) portions of haplotypes will have been lost, but it's probably not too bad. Also note that Jerome is also working on methods to expose the LS algorithm more generally, so the approach below could be obsoleted by his improvements.
The current method allows matching against a tree sequence in which (optionally) all the nodes at time 0 have been removed: these are assumed to be the samples. Generalise this, and allow matching a new sample (possibly at a non-zero time), we could do with 2 things:
Below is a function that will do this:
Here's an outline for a demo matching an ancient sample into an inferred and dated ts. The last step will need fixing, which I'm working on now:
Beta Was this translation helpful? Give feedback.
All reactions