parameter estimation from simple 1D SFS

152 views
Skip to first unread message

Vivak SONI

unread,
Dec 16, 2021, 3:53:47 PM12/16/21
to dadi-user
Hi Ryan,

Apologies if this is a basic question, I am new to dadi and haven't been able to resolve my issue.

I have run some simple stationary population size simulations of a single population and generated site frequency spectra from the results (the sample size is 100). An example sfs is attached (test.fs). I know the true population size is 5000. As I am still getting to grips with dadi I thought a good first step would be to see if I could estimate my population size parameter from the sfs, using the example youve provided here as a basis (https://dadi.readthedocs.io/en/latest/examples/YRI_CEU/YRI_CEU/).

Now my issue is that the inferred population size tends to be very close to whatever starting point is specified. As I am using a log optimization my bounds are [100, 1e5], so I am not really seeing any convergence. I have tried increasing maxiter up to 100, but this still seems to be the problem. As this is a very simple model I feel like I must be missing something quite obvious here.

Finally, I am using the Nelder-Mead optimization and my sample size is 100, so even setting maxiter to 20 results in a 19 hour runtime (using 20 starting points). Would you recommend. Is my sample size too large to be manageable? I'll have 100 simulation runs to be working through eventually so runtime could be an issue.

I have attached my sfs and a python script that I am using to run dadi. Many thanks for all the help.

Best,

Viv
dadi_test.py
test.fs

Ryan Gutenkunst

unread,
Dec 17, 2021, 1:22:34 PM12/17/21
to dadi...@googlegroups.com
Hello Viv,

Please review the dadi paper and documentation to develop a deeper understanding of the method. The dadi optimization does not directly estimate population sizes, it estimates changes in population size relative to the ancestral size. In this case, your bounds are constraining the optimization to be very far from the true simulated values, which explains the difficulty.

Best,
Ryan
> --
> You received this message because you are subscribed to the Google Groups "dadi-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to dadi-user+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/dadi-user/409da7d1-0d1c-47e0-ba1e-b4c8ecd3913dn%40googlegroups.com.
> <dadi_test.py><test.fs>

Reply all
Reply to author
Forward
0 new messages