Hi Viv!
Non-identical twins are the same as regular siblings, genetically? I
should know that, lol. If so, then your reproduction() callback looks
fine. Note that addCrossed() has a count parameter; so instead of the
for loop you could do count=2 to achieve the same thing.
Relatedness back to the grandparent level can be assessed using pedigree
tracking. See the documentation for the keepPedigrees parameter to
initializeSLiMOptions(), and the relatedness() and sharedParentCount()
methods which use that pedigree tracking facility, for example.
I guess, given that information, you could implement your sampling with
some kind of rejection sampling; sample pairs, determine which pairs are
and are not twins, and keep the first N and M pairs to provide N twins
and M non-twins, or some such.
Cheers,
-B.
Benjamin C. Haller
Messer Lab
Cornell University
Viv wrote on 6/27/24 10:16 PM: