Skip to content

Sampling a lineage multiple times #131

@RouxCil

Description

@RouxCil

This issue relates to sampling a lineage multiple times during the time frame. The error message depends on the number of replicates in the 'I' compartment and the seed:

set.seed(1234) / set.seed(123) if running with 5 replicates

path <- '~/Documents/1_projects/bayroot/MultitimeLineageSampling.yaml'
model <- Model$new(yaml.load_file(path))

outer <- sim.outer.tree(model)
plot(outer, type='s')

inner <- sim.inner.tree(outer)
plot(inner)

With 1: outer$get.eventlog() shows no events to display
With 2: @sim.outer.tree(model) Error in .assign.events(run, events) :
Error in .assign.events(): No eligible compartments for transmission event 1.068426060386581hosthost595
With 5 and 123 seed: @sim.inner.tree(outer): Error in .rexp.coal(k, comp, current.time) :
Error in rexp.coal: called on Compartment with <2 lineages.

InitialConditions:
  originTime: 10.0
  size:
    host: 100
  indexType: 'host'

CompartmentTypes:
  'host':
    branching.rates: (host=0.01)
    migration.rates: ()
    transition.rates: ()
    effective.size: 100.0
    generation.time: 1
    bottleneck.size: 1                 
    wait.time.distr:                   
      distr: 'exp'
      hyperparameters:
        rate: 20

Compartments:
  'I':
    type: host
    replicates: 1 or 2 or 5
    
Lineages:
  'virus1':
    sampling.time: (0, 2.0, 3.0)            
    location: I
    replicates: 3 

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions