You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
add example of "add more mutations to SLiM sim" #373
Huh, interesting. Why was this problem not reproducible for me? I ran it over and over, after I got the initial error, and was never able to reproduce the problem. Also, is this a new wrinkle? I've had an example like this for quite a long time, and it has never been a problem until now.
Huh, interesting. Why was this problem not reproducible for me? I ran it over and over, after I got the initial error, and was never able to reproduce the problem. Also, is this a new wrinkle? I've had an example like this for quite a long time, and it has never been a problem until now.
Your discussion on Slack perhaps answered these questions for me; the problem is rare, for this model, because it happens only when a JK mutation occurs on an edge that a SLiM mutation is above. So, hmm. Kinda hoses the simple example I thought I had for this workshop worksheet. :-<
OK, so. It would indeed be great to have this discussed in the pyslim docs, and once that happens, I'll link to that from the SLiM Workshop's worksheet on tree sequence recording, which has an example that occasionally hits this problem.
That would be a natural place to add a mention of ts = pyslim.convert_alleles(pyslim.generate_nucleotides(ts)) as an alternative fix, probably; so, no need for a whole new section, perhaps, but rather just a note about this alternative approach. Right now that section says:
We’ll add these using the msprime.SLiMMutationModel, so that the file can be read back into SLiM, but any of the other mutation models in msprime could be used.
I guess that comes the the caveat that ts = pyslim.convert_alleles(pyslim.generate_nucleotides(ts)) might be needed for those other mutational models to work; so that would be a natural place to add this, maybe?
Anyhow, I've got my brain wrapped around this now, and will decide what to do for the example in the workshop. :->
Activity
bhaller commentedon May 28, 2025
Huh, interesting. Why was this problem not reproducible for me? I ran it over and over, after I got the initial error, and was never able to reproduce the problem. Also, is this a new wrinkle? I've had an example like this for quite a long time, and it has never been a problem until now.
bhaller commentedon May 28, 2025
Your discussion on Slack perhaps answered these questions for me; the problem is rare, for this model, because it happens only when a JK mutation occurs on an edge that a SLiM mutation is above. So, hmm. Kinda hoses the simple example I thought I had for this workshop worksheet. :-<
bhaller commentedon May 28, 2025
OK, so. It would indeed be great to have this discussed in the pyslim docs, and once that happens, I'll link to that from the SLiM Workshop's worksheet on tree sequence recording, which has an example that occasionally hits this problem.
Clemens Weiss mentioned on Slack:
That would be a natural place to add a mention of
ts = pyslim.convert_alleles(pyslim.generate_nucleotides(ts))as an alternative fix, probably; so, no need for a whole new section, perhaps, but rather just a note about this alternative approach. Right now that section says:I guess that comes the the caveat that
ts = pyslim.convert_alleles(pyslim.generate_nucleotides(ts))might be needed for those other mutational models to work; so that would be a natural place to add this, maybe?Anyhow, I've got my brain wrapped around this now, and will decide what to do for the example in the workshop. :->