Skip to content

Compartment

Tammy Ng edited this page Feb 16, 2018 · 6 revisions

A Compartment is an object representing an individual host environment that may contain one or more pathogen lineages. Lineages within the compartment are assumed to comprise a single, well-mixed population. Lineages can only coalesce with other lineages that are located in the same compartment.

YAML template

Compartments:
  <label>:
    type: <reference to CompartmentType object>
    source: <reference to another Compartment object>
    branching.time: <"birth" time of this Compartment from transmission>
    replicates: <propagate to replicate Compartment objects>

Arguments

  • label is a unique string identifier that is used to map a Compartment object to a leaf/node label of a user-specified input tree, and for generating output trees. If pop.size is greater than 1, then unique labels will be generated by appending integer indices to this label.
  • type identifies the CompartmentType that this Compartment object is an instance of.
  • source identifies another Compartment object that transmitted one or more lineages to the current object. This setting is used for manually configuring a host/transmission tree from individual hosts as Compartment objects.
  • branching.time is the time of the transmission or cospeciation event in which lineages were first introduced to this Compartment. Beyond this time, the Compartment is assumed to be empty and is not tracked further. This time is measured on a reverse time scale, where the origin (zero) is the time of the most recent lineage sample.
  • replicates is a convenience parameter that is used to generate two or more Compartment objects belonging to the same type. If replicates is set to an integer value greater than 1, then source and branching.time are invalidated.

Details

  • A compartment is implicitly infected at the time of a transmission or cospeciation event where it is the recipient and not the source. We assume that there are no lineages in the compartment prior to infection.
  • Additional lineages may be transferred into the compartment subsequent to infection (superinfection, migration).
  • A Compartment that does not contain any sampled lineages may be an unsampled infected host (and still a potential source of transmission) or a susceptible host.
  • A susceptible host compartment is a special type that has a zero transmission rate, has no source, and serves only to modulate the transmission rates over time. Consequently, they are not tracked as individual instances.

Examples

Clone this wiki locally