Closed regevs closed 7 years ago
A limitation of the existing loadPedigree
implementation is that all individuals without parents will be placed in the top generation, so you would have to generate a few fake grandparents to complete the pedigree to place individuals in the right generation. This also applies to a pedigree mating scheme because all the genes will be dropped from the top generation.
After all, backward-time simulations could start from the last generation and determine the generation of all ancestors, forward-time simulations cannot do this unless we determine ancestor generations using a backward-time approach before forward-time simulation.
I want to use simuPOP in order to generate two individuals with a known relationship (e.g., grandparent and grandchild). For that, I am generating a Pedigree object manually with creating a file:
and loading it using
sim.loadPedigree
. That is, 100 and 101 are the parents of 500; 500 and 200 are the parents of 501. However, the object generated looks like this:In particular, note that ID 501 is in generation 1 and 0. I suspect this is a problem, because when I use this pedigree later with
sim.PedigreeMating
, Python crashes with:I suppose this is a misuse of the pedigree object; is there a way to obtain what I want to do? Thanks!