Closed noscode closed 2 years ago
MA1 and Neanderthal should be set as "non-ascertained" populations when calling set_data
, like so:
model.set_data(data, length=length, non_ascertained_pops=["MA1", "Neanderthal"])
See also the 2nd paragraph of A.4.1 in the paper.
I believe that doing this should also fix the error above.
Explanation: As part of the likelihood computations of the Poisson model, momi estimates the fraction of missing alleles in each of the ascertained populations. This estimate requires 2 alleles per population. By setting MA1 as non-ascertained, momi won't won't compute the missing-allele probability for it, and the problem should be avoided.
Hi @jackkamm,
Thank you very much, yes, that works!
Best regards, Ekaterina
Hi @jackkamm,
Some time ago you have provided me SFS data used in the paper about momi2, thank you very much for that! Now I am trying to evaluate the value of likelihood for the model from the paper. However I faced some problems and maybe you can help me with that?
I constructed the demographic model (without any parameters, just with fixed values) and set SFS data to it. Then I tried to evaluate
log_likelihood
and I got an error. The code is something like that:The error occur in the last line and appears after some time of evaluation:
I have tried to look at
momi/data/configurations.py
file and printsampled_n
andmax_n
values right before the comparison. The result was the following:I am not sure but maybe this behaviour is connected with sample size of MA1 population? It is the only one with haploid data.
I am looking forward for your reply, thank you very much for your help in advance!
Best regards, Ekaterina