Repository navigation
remove first gen - #106
remove first gen#106
Conversation
|
Hey. The previous PR is merged now, but the "files changed" for this PR still seems to include all the diffs from that previous PR. Maybe this PR needs to be rebased or something? Anyway, I'll wait for you to fix this situation before I look at it further. :-> |
ad7401d to
00c4bfc
Compare
|
hm, yep, needed a rebase for some reason. |
| #define SLIM_TSK_INDIVIDUAL_ALIVE ((uint32_t)(1 << 16)) | ||
| #define SLIM_TSK_INDIVIDUAL_REMEMBERED ((uint32_t)(1 << 17)) | ||
| // DEPRECATED: | ||
| #define SLIM_TSK_INDIVIDUAL_FIRST_GEN ((uint32_t)(1 << 18)) |
There was a problem hiding this comment.
If we're no longer using this anywhere in the code, can we actually comment this line out, to ensure that nobody uses it?
There was a problem hiding this comment.
Yes, I guess so - I thought we'd need to keep it around to load old files, but since we don't...
| j["metadata"]["individuals"]["flags"]["17"]["description"] = "the individual was requested by the user to be remembered"; | ||
| j["metadata"]["individuals"]["flags"]["18"]["name"] = "SLIM_TSK_INDIVIDUAL_FIRST_GEN"; | ||
| j["metadata"]["individuals"]["flags"]["18"]["description"] = "the individual was in the first generation of a new population"; | ||
| j["metadata"]["individuals"]["flags"]["18"]["description"] = "the individual was in the first generation of a new population (DEPRECATED)"; |
There was a problem hiding this comment.
Since we no longer write this flag out (right?), do we need to describe it in our metadata?
|
I just made a few comments. Seems pretty straightforward, but I haven't thought about it very hard. Does it pass all of your tests? I can test it tomorrow with crosscheck, etc. |
|
I haven't tested yet - I am still getting the pyslim changes together. I'll let you know when that all works. |
| } | ||
| else | ||
| { | ||
| // this case has a fash search (hash table), but the unordered_map is slow to build |
There was a problem hiding this comment.
might as well fix the typo while you're modifying this code, fash->fast
There was a problem hiding this comment.
oh I thot u meant "fashionable search" ;)
| } | ||
| } | ||
|
|
||
| void SLiMSim::UnmarkFirstGenerationSamples(tsk_table_collection_t *p_tables) |
There was a problem hiding this comment.
oh man, this feels good :->
| goto out; | ||
| } | ||
| simplifier_map_mutations(self, input_id, x->left, x->right, x->node); | ||
| simplifier_map_mutations(self, input_id, x->left, x->right, output_id); |
There was a problem hiding this comment.
Sounds like this change will be in a tskit point-release soon; I guess we're taking it early, and will take the rest of the tskit changes that are in that point-release with a separate PR, also for SLiM 3.5, right? And then hopefully we're done with all this tskit fallout for a while.
There was a problem hiding this comment.
yep, that's my thought.
removed FIRST_GEN whatnot minor tweaks search is fast not fashionable
3a4938b to
5b7cf4f
Compare
Here's a start at this.
Also, adding "stage" to the metadata.
I don't think we need to do anything different on reading in files: these may have individuals marked FIRST_GEN, but these are not samples, so everything should just work out. (They may persist through luck, and keep the flag, but that's ok.)
Simliarly, we don't set the stage on loading the tree sequence - although we could check for consistency.
This has all the changes in #101 as well, so the diff will look reasonable once that's merged.