Closed philipbg closed 1 year ago
That's actually intended. A better description of the keepParents argument is probably needed. The keepParents argument only pertains to the mother and father slots in the population and not the pedigree stored in SimParam. This is due to each being used differently in the software.
The pedigree in SimParam is used to for haplotype tracking and needs to be more rigidly structured to avoid breaking this code. It needs to keep track of each unique genetic entity in the simulation.
The pedigree shown in the population is used for selection (e.g. selectWithinFam
). You can freely change the mother and father slots in a population without any effect on the haplotype tracking code. What it does is change how the selection functions view families and thereby how selection is performed. This exists to model how plant breeders think of families when talking about inbred lines.
Describe the bug I am using
reduceGenome()
anddoubleGenome()
to make gametes and cross them instead of crossing individuals. I would expect that thekeepParents
argument of each of these functions would modify which mother and which father are recorded in the pedigree (i.e.,SimParam$pedigree
) after implementing these functions. However, the pedigree is the same regardless of whether this argument is set toTRUE
orFALSE
.Steps To Reproduce
Expected behavior I would expect that the
keepParents
argument would influence which parents are shown in the pedigree. I want to be able to recover a pedigree that shows the parents of the final cross (the last 5 lines of the pedigree; made byrandCross()
) to be individuals frombasePop
, which would mean that the numbers for the mother and father in the last 5 lines in this example should be between 1 and 5 since the basePop had 5 individuals. They are instead between 16 and 25 corresponding to thedoubleGamete
population.