Hi Aubrey,
Sorry for the slow reply; I've been rather swamped lately. :-O
My initial guess is that you're being bitten by the fact that SLiM
tracks mutational lineages (identity by descent) not mutational
states (identity by state). Because of this, if you do something
like:
haplosome1.addNewMutation(m1, 0.0, 1468);
haplosome2.addNewMutation(m1, 0.0, 1468);
haplosome3.addNewMutation(m1, 0.0, 1468);
to add a mutation at position 1468 in three different haplosomes,
you will NOT get the same mutation in all three haplosomes; you will
get three different mutation objects that will be considered
different mutations – differebt "mutational lineages" – even though
they are "identical by state" – identical mutation types, selection
coefficients, and positions. Position 1468 will therefore be
multiallelic; it will have those three mutations all segregating at
it (in addition to the "empty state" when haplosomes don't contain
any of those three mutations).
If you want to get a single mutation object across all of those
haplosomes, you need to be careful to add just one new mutation.
You might do that with a pattern like:
c(h1, h2, h3).addNewMutation(m1, 0.0, 1468);
to add the mutation to all of the target haplosomes at the some
time, or:
mut = h1.addNewMutation(m1, 0.0, 1468);
h2.addMutations(mut);
h3.addMutations(mut);
to add the existing mutation object to h2 and h3 after you create it
in h1. The same kind of thing can happen if you load the same
mutations from VCF files in multiple passes (archaic vs. modern
humans being loaded separately, for example); a given mutation needs
to be loaded from a single VCF file that describes all of the places
where it occurs.
For further discussion of these sorts of considerations, please see
section 1.5 of the SLiM manual, especially 1.5.2 and 1.5.3.
If this is not the problem you're encountering, please post again
with a complete but minimal example that demonstrates the problem
you're encountering. That minimal example should run in SLiMgui
(i.e., with no command-line arguments needed), and any input files
needed should be supplied. Good luck, and happy modeling!
Cheers,
-B.
Benjamin C. Haller
Messer Lab
Cornell University