Skip to content

Commit 1db5791

Browse files
committed
basic implementation, lots yet to do
1 parent 0657f03 commit 1db5791

11 files changed

Lines changed: 1098 additions & 478 deletions

VERSIONS

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,18 @@ multitrait branch:
204204
add a built-in "Multispecies Multitrait Phenotype ~ Time" plot for phenotype ~ time, with one line per trait across all species
205205
add a built-in "Phenotype ~ Time" plot for phenotype ~ time, focusing on a single user-selected trait across subpopulations
206206
clean up the way pedigree IDs get recorded, for better efficiency and parallelization
207+
shift pedigree tracking into a table of pedigree IDs and parent pedigree information (pedigree_table_)
208+
x this table is simplified periodically (every 25 cycles, at present) with a mark-and-sweep algorithm working back from extant and remembered individuals
209+
o the ancestry depth kept should be configurable through the keepPedigrees= parameter to initializeSLiMOptions(), which should become [li$ keepPedigrees = F] allowing an integer depth (-1 says "never simplify the pedigree")
210+
o the pedigree_p1_ and pedigree_p2_ fields in the Individual metadata should be removed in favor of this new scheme (changes schema; breaks backward compatibility for this metadata)
211+
o RecursiveMarkPedigree could be unrolled for the parents-only case to avoid the recursion
212+
o when pedigree tracking is forced on by tree-sequence recording, it should force it on keeping only parents
213+
o need to determine how to handle retained versus remembered individuals
214+
o add API to write out the pedigree tracking table in a standard format (and it'd be nice if it was easy to read in, too, for the example recipes!)
215+
shift the pedigree recording/following recipes to also provide an example of using the pedigree tracking table for this purpose, which would be really nice
216+
o add an API to fetch pedigree IDs for all ancestors N generations back; and maybe a parameter to relatedness() that says how many generations back to go, so the user has control over that
217+
o then add persistence of this information in top-level metadata; probably this should be optional, but defaulting to T so that round-trips work correctly
218+
o doc changes -- doc in SLiMgui too; the main user-visible change is to keepPedigrees= now, and to tree-sequence metadata, treeSeqOutput(), etc.
207219

208220

209221
version 5.2 (Eidos version 4.2):

core/community.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2988,7 +2988,14 @@ bool Community::_RunOneTickWF(void)
29882988

29892989
for (Species *species : all_species_)
29902990
if (species->Active())
2991+
{
29912992
species->MaintainTreeSequence();
2993+
2994+
// for now we simplify the pedigree tracking table every 25 cycles
2995+
if (species->PedigreesEnabled())
2996+
if (species->Cycle() % 25 == 0)
2997+
species->SimplifyPedigreeTable();
2998+
}
29922999

29933000
// LogFile output
29943001
for (LogFile *log_file : log_file_registry_)
@@ -3422,7 +3429,14 @@ bool Community::_RunOneTickNonWF(void)
34223429

34233430
for (Species *species : all_species_)
34243431
if (species->Active())
3432+
{
34253433
species->MaintainTreeSequence();
3434+
3435+
// for now we simplify the pedigree tracking table every 25 cycles
3436+
if (species->PedigreesEnabled())
3437+
if (species->Cycle() % 25 == 0)
3438+
species->SimplifyPedigreeTable();
3439+
}
34263440

34273441
// LogFile output
34283442
for (LogFile *log_file : log_file_registry_)

0 commit comments

Comments
 (0)