-
Hi everyone, I am new to treesequences and started playing with some simulations where I create the model in Demes -> run in Slim -> produce TreeSequences and recapitate.
One of the thing I have a hard time to figure out right now is how to compute the admixture composition of each individual. Or let me know if this is not possible at this time in tskit without using mutations to identify parental populations. Thanks a lot, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Generally, I think the thing to do is (a) Remember everyone in your tree sequence at the time you want to define "ancestral populations" for the purposes of visualizing admixture; and then (b) find IBD segments from your final sample back to those ancestors. Is this what you'd say, @gtsambos? (The documentation for this is not fleshed out yet, apologies.) This will take longer if the reference time is longer ago (more segements to track). There ought to be a way to just output a summary instead of all the segments, but I don't see how to do it with our current set of statistics. It'd be fun to work out a way to do that. |
Beta Was this translation helpful? Give feedback.
-
That is not surprising to me. 101 must be the right number. Those plots make sense! So, I think what you want is what you get from using max_time=101. As for |
Beta Was this translation helpful? Give feedback.
-
Ok so thanks to @petrelharp, there are two ways of doing this. Either find the admixture compositions with the
Or with the
This gives exactly the same results and is equivalent to using fixed mutations to identify ancestral populations in my use case. The |
Beta Was this translation helpful? Give feedback.
Ok so thanks to @petrelharp, there are two ways of doing this.
The important point is to remember all ancestors at the point we define reference populations in our simulation, either using
treeSeqRememberIndividuals
in SLiM (I needed to use it in theearly
event in my case), or using acensus
event in msprime (not a sampling event).Either find the admixture compositions with the
ibd_segments
(much slower):