-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Hi. I have some question about the simplify() method of tree sequence. I 'm a slim user. I need to run a simulation with neutral and deleterious mutations. Since it takes a lot of time, I decided to use tree sequence to avoid the neutral mutations in my simulation, and overlay them to the tree sequence after my simulation finished. When I tried to do that, I noticed this sentence in the slim manual: Here, our chosen goal is to overlay mutations only back to the point of coalescence, and so we call simplify() to strip away all ancestral information above the point of coalescence. (If we wanted to overlay fixed mutations as well, past coalescence back to the start of forward simulation, then we would not call simplify().)
Actually, I do need to overlay the fixed mutations, so I tried to understand the consequence of simplify(), but found it hard to understand. I overlaid neutral mutations to my tree sequence by msprime. I tried to call the "msprime.sim_mutations (...)" with and without the "ts.simplify()" before it. With that sentence in slim manual, I expected the results of the model with the simplify() would not have any fixed mutations, but it seems not true. When I reloaded the tree sequence back to slim, I found there are some fixed mutations. But the counts of fixed mutations between "with simplify()" and "without simplify()" are indeed different. I am confused about it. Did I misunderstand the sentence in the slim manual? Could you explain it for me and show an example in detail?
When I tried to find the tutorial of simplify(), I found that there are maybe a mistake in the "Completing forwards simulations". The last part of this tutorial seems to show the consequence of simplify(), which is the exactly thing I want to know, but the last figure is exactly the same figure as the figure before it. Did I misunderstand it? Or it's indeed a mistake?
By the way, I find it's not easy to access the frequency or count of each mutation. Are there some straight way to do that? Such as a single method or a property of mutation object?