Calculating number of extant lineages over time #2873
-
Hi, I have been running simulations in msprime and want to analyse my tree. For example: If I have a simple simulation ...
Which produces this tree ... Is there already a function in tskit that will output the number of extant lineages over time? Or if I could know when the number of branches changes and by how much? What I thought ...
I may be overcomplicating this, but I would like to calculate the coalescent rate over time for a particular simulation and I think this would help me do so. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Getting the number of extant lineages overall is a bit tricky, I'm not sure we have an easy way to do that. Related methods which might be helpful:
This might be an example of an question that can be answered more easily using a graph-based approach like discussed here: #2869 @GertjanBisschop, do you know of an easy way to do this? |
Beta Was this translation helpful? Give feedback.
Hmm, are you wanting to calculate an empirical pairwise coalescence rate from a simulated tree sequence, within specified time intervals? If so, one way to do so is: