Repository navigation
Conversation
And (for the moment) correct the bug in tskit by hand.
b7dc8ae to
925b903
Compare
|
This all sounds great, thanks! Is it ready to merge? Should @petrelharp review it, or is there no need? |
I think it might be helpful, if he has time. Perhaps at the same time as looking at the pyslim changes I'm about to push to keep this in sync? |
| if pedigree_id in slim: | ||
| # We have a duplicate: | ||
| if slim[pedigree_id].type == "remember": | ||
| continue # "remember"ed takes priority: do not overwrite |
There was a problem hiding this comment.
not getting the whole picture here, but do we also need a "retain takes priority over retain if unary" here?
There was a problem hiding this comment.
oh, I see, we only check below if this starts with retain, so it doesn't matter? still, it'd be nice to get the right thing in here.
There was a problem hiding this comment.
We never have both retain_if_unary and retain in the same simulation, so it's never an issue.
There was a problem hiding this comment.
ah, well, perhaps we should have them both in the same simulation?
There was a problem hiding this comment.
Since we only specify "retainCoalescentOnly" for the entire TS recording, we have no way of doing this. But I can change the logic in case we ever do implement something similar? I can't see how it would work though!
There was a problem hiding this comment.
Yes we can do that. If so, we need to mark all retained individuals as "retain". If, at the top, we use retainCoalescentOnly=F, we mark all retained individuals as "retain_if_unary".
There was a problem hiding this comment.
Note that "retain" and "retain_if_unary" are only convenience flags in the text-save of the individuals, for testing. And also note that any individuals we zap with treeSeqRememberIndividuals(..., permanent=T) are marked as "remember" which always overrides either "retain" marking.
There was a problem hiding this comment.
I think I'm being slow here, but: we can do retainCoalescentOnly=T, and then only mark SOME of the individuals to retain; this will produce a mix of retain and retain_if_unary. Ah, I see - if retainCoalescentOnly=T, then should retain have no effect? (Still, we could be checking nothing weird happens.)
There was a problem hiding this comment.
I think there's some confusion here. retainCoalescentOnly=T only applies during treeSeqInitialize(). So either it's on for the whole simulation, or off for the whole simulation.
If "on", then any node permanently remembered is output with a "remember" tag, and and node temporarily retained is output with a "retain" flag.
If "off", then any node permanently remembered is output with a "remember" tag, and and node temporarily retained is output with a "retain_if_unary" flag.
There was a problem hiding this comment.
ack, sorry, I think I need some more coffee now.
|
I see there was some review by @petrelharp. Is that complete? Is this ready to merge? Don't mean to nag, just wondering if this has stalled for no reason. :-> |
|
AFAIK this just needs @petrelharp 's sign-off. it's linked to tskit-dev/pyslim#125 which needs, I think, one extra test, is that right @petrelharp ? |
As it might be a little while until the tskit fix for keep unary in individuals makes it into a release, I have hacked in the fix by hand in the PR. I have also renamed some of the tests as per #142 (comment) to replace
000with___which I think is less confusing. There's also a new suite of python tests intended to test the results of specific SLiM recipes, rather than more general tests of any TS produced by SLiM.I'm now move on to documenting this in pyslim, so that @petrelharp can release a compatible version.