BoPeng / simuPOP

A general-purpose forward-time population genetics simulation environment.
http://bopeng.github.io/simuPOP/
GNU General Public License v2.0
31 stars 12 forks source link

Questions about Temporal effective population size #63

Closed MrLocuace closed 6 years ago

MrLocuace commented 6 years ago

Dear Bo,
I'd like to ask you a couple of questions about the example provided here: http://simupop.sourceforge.net/manual_svn/build/statNeInterval.py

  1. My understanding is that the Wright-Fisher model asumes a constant pop size, but in the example the Ne growths along generations. Where does the growth in Ne comes from, since no demographic model like "population expansion" is provided?
  2. The temporal Ne methods are based on variance of allele frequencies along generations. I have a population generated in other analysis and I'd like to estimate Ne following this example. In the example you have loci=[1]*50, so then you can generate some variance on allele frequency at allele 1. Is that right?. May I ask you how to do the same from a loaded .pop population?. Which class or function can I use?
  3. Is it possible to apply these Ne vars (Ne_waples89_P1 or Ne_waples89_P2) to different mating schemes without fixing the offspring number and using an EventBasedModel class?

Thanks very much All the best, Luc

BoPeng commented 6 years ago
  1. Ne is an estimation based on two temporal points, not the "truth". The simulation has loci=[1]*50 so there are essentially 50 free recombining chromosomes so allele frequencies evolve separately. My guess is that the initial population has roughly equal allele frequency but evolution increase the variance of allele frequency. You can print/plot allele frequencies and check. If the population size is big enough Ne should oscillate around the truth. You can enlarge population size and simulate for longer period and see.

  2. loci=[1]*50 means 50 loci on 50 chromosomes. The estimates use all loci. For the loaded population you only need to specify the range of loci for the estimation, something like effectiveSize=range(your_number_of_loci).

  3. You can apply these estimates to whatever populations. Remember these are "estimates". They will be "wrong" for your particular demographic model but the pattern of bias should be of interest. The example actually shows you how to estimate Ne based a fixed base temporary point and a moving temporary point, and the latter should reflect more "recent" Ne on a population with changing population size.

MrLocuace commented 6 years ago

Thank you very much, Bo All the best, Luc