Skip to content

ancient pseudo diploid individual and numeric issue #81

@jqjqyangjq

Description

@jqjqyangjq

Thanks for developing the method.
I am likely facing numeric issues with adding pseudo-diploid data from an ancient individual to the dataset, so in the sfs.gz file, the allele count is always [0,2] or [2,0] or [0,0] (missing).
The warnings I received:
autograd/tracer.py:48: RuntimeWarning: divide by zero encountered in log
return f_raw(*args, **kwargs)
/momi/data/sfs.py:408: RuntimeWarning: invalid value encountered in multiply
ret = -lambd + lambd * np.log(lambd) - scipy.special.gammaln(lambd + 1)

In an out-of-Africa model, this always leads to an unexpectedly large population size of diploid populations that are related to the pseudo-diploid ancient individual.
Alternatively, if I followed the publication, setting the population size of the ancient individual to that of an ancestral lineage, the population size can also be extremely inflated (e.g., 10000000000).

Modifying [0,2] [2,0] to [0,1] [1,0] does not seem to help. specifying model.set_data(sfs, non_ascertained_pops=["ancient_individual"]) does not solve this either.

To me, this seems to be an issue of estimating the population size of the pseudo-diploid individual.

Could you maybe suggest how one should deal with the pseudo-haploid / pseudo-diploid data in this case? Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions