Combined Visualisation of Phylogenetic and Epidemiological Data

A collection of utilities and 'ggplot2' extensions to assist with visualisations in genomic epidemiology. This includes the 'phylepic' chart, a visual combination of a phylogenetic tree and a matched epidemic curve. The included 'ggplot2' extensions such as date axes binned by week are relevant for other applications in epidemiology and beyond. The approach is described in Suster et al. (2024) .


phylepic

r-universestatus R-CMD-check CRANstatus

Phylepic contains tools for visualisations that are useful for genomic epidemiology of pathogens, designed for a public health setting.

Installation

You can install phylepic like so:

# CRAN release
install.packages('phylepic')

# development version
install.packages('phylepic', repos = c('https://cidmp-ph.r-universe.dev', 'https://cloud.r-project.org'))

Example

This is an example of a very minimal phylepic chart.

library(ape)
library(phylepic)

tree <- read.tree(text = "((D:0.3,C:0.4):0.5,B:0.1,A:0.2);")
metadata <- data.frame(
  ID = c("A", "B", "C", "D"),
  date = as.Date(c("2024-01-10", "2024-01-12", "2024-01-21", "2024-01-23")),
  country = factor(c("Australia", "Australia", NA, "New Zealand"))
)

phylepic(tree, metadata, ID, date) |> plot()

Refer to the package vignette for a more complete example.

Citation

See citation("phylepic").

Suster CJE, Watt AE, Wang Q, Chen SC, Kok J, Sintchenko V (2024). “Combined visualization of genomic and epidemiological data for outbreaks.” Epidemiology & Infection 152: e110. doi:10.1017/S0950268824001092,

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("phylepic")

0.3.0 by Carl Suster, a year ago


https://github.com/cidm-ph/phylepic, https://cidm-ph.github.io/phylepic/


Report a bug at https://github.com/cidm-ph/phylepic/issues


Browse source code at https://github.com/cran/phylepic


Authors: Carl Suster [aut, cre] , Western Sydney Local Health District , NSW Health [cph] (2024-2025)


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports ape, cli, cowplot, dplyr, forcats, ggnewscale, ggplot2, ggraph, igraph, lifecycle, rlang, scales, tidygraph

Suggests knitr, rmarkdown, testthat


See at CRAN