Comments (8)
I guess I'm proposing:
Individuals would only be part of the individual table forevermore (i.e., permanently remembered) if treeSeqRememberIndividuals()
had been called on them. Usually, these individuals would have information as it was at the time that treeSeqRememberIndividuals()
was called. However, I am proposing that if a permanently remembered individual is alive when the tree sequence is written out to file, then their information will be whatever it is at that time.
However, if a tree sequence is written out again in the future when that individual is not alive, then their information in the individual table will be as it was when treeSeqRememberIndividuals
was called, because that's what's in the remembered_individual_table
, and the output individual table starts from a copy of this. We'd at least be able to tell this had happened, because in the tree sequence produced by the first call, the individual is marked as alive
.
For example:
-
Generation 10: remember individual 1, who is age 3.
- in
remembered_individual_table
, individual 1 is age 3.
- in
-
Generation 12: output tree sequence; individual 1 is still alive.
- in
remembered_individual_table
, individual 1 is age 3. - in the output tables, individual 1 is age 5 and marked as
alive
- in
-
Generation 20: output tree sequence, individual 1 has died.
- in
remembered_individual_table
, individual 1 is age 3. - in the output tables, individual 1 is age 3 and not marked as
alive
.
- in
from slim.
Oh! We did this!
from slim.
We'd need a policy for what happens if someone got remembered twice (keep their data from the first time, maybe?).
There is also a bit of an odd question when it comes to individuals that are both remembered and alive. Does their entry contain the information at the time point when they were remembered, even if it has subsequently changed? Presumably not – presumably entries for living individuals contain the current information for those individuals. So then once that individual dies, does its entry then revert to the information that was present at the time it was remembered? That's pretty weird. There is always this tension, with the tree-seq tables, with mutable information, unfortunately. Between "up to date info" versus "info at time of recording".
from slim.
Does their entry contain the information at the time point when they were remembered, even if it has subsequently changed? Presumably not – presumably entries for living individuals contain the current information for those individuals.
Oh dear - yes, it has to, to make loading back in of the .trees
file work. So, then I propose that the policy be that the most recent time they were remembered (which includes writing out the tree sequence file!) be what is recorded in the individual table.
from slim.
So, then I propose that the policy be that the most recent time they were remembered (which includes writing out the tree sequence file!) be what is recorded in the individual table.
Are you proposing that writing out a file would permanently remember all of the extant individuals, as if treeSeqRememberIndividuals() had been called on them? Or just that they would be considered "remembered" in terms of this most of "most recent time remembered", for what info gets written out?
from slim.
Yes, I think this is the way it needs to work. It's a bit strange, but seems best overall.
from slim.
OK, reviewing this. You wrote:
Generation 12: output tree sequence; individual 1 is still alive.
inremembered_individual_table
, individual 1 is age 3.
in the output tables, individual 1 is age 5 and marked asalive
So individual 1 is in remembered_individual_table
, recorded with an age of 3, and your proposal is that the output table would always begin with remembered_individual_table
. So I guess you are proposing that the output table would contain individual 1 at its assigned position near the beginning, within the remembered_individual_table
section, but that its age entry would get patched, at save time, with its current age at time of saving, and its alive
flag would be patched to true
(whereas entries in the remembered_individual_table
would presumably all have false
, so that we don't have to maintain those values as the simulation runs)? Does this sound right?
from slim.
Yes, exactly.
from slim.
Related Issues (20)
- feature request: do not include trailing blank space when pressing ctrl+shift+left/right HOT 2
- turn pacman crank for SLiM 4 HOT 2
- `treeSeqRememberIndividuals(inds)` now throws an error if inds is of length zero HOT 1
- Error when using tree sequence recording in conditional simulations HOT 1
- logfiles and absolute paths on windows HOT 1
- Add parent age information to Individual HOT 15
- Tree-seq docs in the SLiM manual need a review HOT 4
- SLiM 4.0.1 release process HOT 13
- More than ~2 billion segregating mutations doesn't give a good error HOT 1
- add `localPopulationDensityAtPoint` method HOT 4
- Windows CI failing due to SIGTRAP HOT 3
- Can't reload recapitated tree to SLiM HOT 16
- "Total fitness <= 0.0" error loading population state - memory issue or something else? HOT 5
- Windows fix for RNG seeding needed HOT 8
- open and save file dialogs should start in working directory? HOT 4
- SLiMgui prompts "This document has been modified" even though it hasn't HOT 6
- "end of simulation" tick specification HOT 3
- between-species interactions invalidated for species other than the first in reproduction() HOT 1
- Manual needs to be updated to reflect change of originTick to originGeneration HOT 2
- Output a full ARG tree sequence HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slim.