Skip to content

Fix sim.arg crash at high rho - #183

Open
WongDWai wants to merge 8 commits into
mainfrom
test-superinf
Open

Fix sim.arg crash at high rho#183
WongDWai wants to merge 8 commits into
mainfrom
test-superinf

Conversation

@WongDWai

Copy link
Copy Markdown
Collaborator

issue #182

  • Host: new lineage pool (init/activate/deactivate slots)
  • Pathogen: new slot.id field
  • simARG.R: .do.recombination samples from the pool
  • simInnerTree.R: .do.coalescent frees slots when lineages merge
  • All existing tests pass, new tests added

WongDWai and others added 8 commits August 21, 2026 10:42
…inguish individuals; recombination parent lineages inherit source pathogen id, coalescent inherits a child's id. do.infection counts unique carrier.id for rhyper().
… to distinguish individuals; recombination parent lineages inherit source pathogen id, coalescent inherits a child's id. do.infection counts unique carrier.id for rhyper()."

This reverts commit 3a33bed.
…d earlier carrier.id because I don't think it was modelled in a biologically accurate way.
…a fixed pool of p.size lineages (a proportion of which are currently active), only activating a previously-inactive one when chosen. Total pool size never changes.
@ArtPoon

ArtPoon commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

If one or more active lineages are transferred out of the Host by a superinfection event, they need to be instantaneously replaced by inactive lineages to the set effective population size, as we continue to follow that host backwards in time. Otherwise superinfections will deplete the pool

@ArtPoon

ArtPoon commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Explicitly storing a list of Pathogen objects to the effective population size for every Host object results in too many objects, I think. Pathogen objects were meant to be used for active (sampled) lineages only. It should be possible to store the same kind of information without creating so many objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants