import_local_transmission: import_local_transmission

View source: R/Import_local_transmission.R

import_local_transmissionR Documentation

import_local_transmission

Description

import_local_transmission takes the output of LineageHomology_w_uncertainty_v2 and produces estimates of the number of importation and local transmission events.

Usage

import_local_transmission(
  tree,
  LineageHomology_replicates,
  start_time,
  time_interval_size = 1/52
)

Arguments

start_time

The numeric date of the root of the tree.

time_interval_size

The length of the time intervals to aggregate, e.g. 1/52 corresponds to 1 week.

Details

Singletons are translated directly to importation events. The time of the importation for singletons is set to the midpoint of the edge downstream of the geographical transition leading to the singleton. For transmission lineages (TLs), the function assumes that a TL starts with an importation event. The timing of this importation event is set to the midpoint of the edge on the ancestral branch of the most recent common ancestor of the TL. In each TL, the function assumes that the branching points (nodes) define local transmission events. Thus the procedure does not consider within-host diversity, and the timing of events should be interpreted with caution.

Value

The function returns matrices with counts of local transmission ("LC") and importation events ("Import") on the time intervals, where each row contains the results from one replicate. The function also returns the times of the midpoints of the time intervals ("week_time")


magnusnosnes/GeoLineages documentation built on April 17, 2025, 6:29 p.m.