ben18785 / Selection_simulations

Simulating Wright-Fisher, Moran and Yule processes.
1 stars 1 forks source link

Current state of simulations #5

Closed ben18785 closed 5 years ago

ben18785 commented 5 years ago

@Armand1 I have just uploaded the model code and some html documents.

Things to note:

In s_frequencies_inference.html, you should see how I can retrieve the parameters via inference used to simulate the Wright-Fisher model. For Moran and Yule, the inference process is much more complex and I'm not sure how to fit the data (other than use the WF statistical model, which we know is incorrect).

In s_run_simulations.html, this shows you how to run each of the three models from R.

Armand1 commented 5 years ago

We ran them on the HPC. Which we can do again. But Yule only grows linearly -- gain one individual per time step -- though, yes, it is difficult.

Armand1 commented 5 years ago

Looking into Models.py, I see that all generative models -- WF, Moran and Yule -- depend on Bentley.py. This appears to contain the core generative functions. But, just to be clear, this does not accumulate variants as in what we called the "Bentley" model, which is a WF model but in which you assay not just living variants but corpses, so that the assay population has N individuals x t time steps?

I ask since, although previously we looked at this, I am have now dropped this as being an obsession peculiar to archaeologists. We want, in generation, just the individuals who are alive -- who can potentially reproduce -- in that generation.

Armand1 commented 5 years ago

No, the counts must consist of just a single generation. That's because, as predicted by theory, the neutral WF process gives a good fit to a log series SAD rather than a power law. The NFD gives a less good fit, but that's perhaps expected. See Results Issue.

ben18785 commented 5 years ago

Yes, the offspring are chosen from the existing (alive) parents, not a collective of corpse variants.

Merry Christmas to you too, by the way! Were you in London for it?

On 26 Dec 2018, at 09:35, Armand1 notifications@github.com wrote:

No, the counts must consist of just a single generation. That's because, as predicted by theory, the neutral WF process gives a good fit to a log series SAD rather than a power law. The NFD gives a less good fit, but that's perhaps expected.

SADS.pdf

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.