<p><a href="https://cran.r-project.org/package=OutbreakTools">OutbreakTools</a> implements basic tools for the analysis of Disease Outbreaks.</p>
<p>It defines <code>S4</code> class <code>obkData</code> to store case-base outbreak data. It also provides a function, <code>plotggphy</code>, to visualize such data on the phylogenetic tree.</p>
<pre><code>library(OutbreakTools)
data(FluH1N1pdm2009)
attach(FluH1N1pdm2009)


x &lt;- new(&quot;obkData&quot;, individuals = individuals, dna = FluH1N1pdm2009$dna,
         dna.individualID = samples$individualID, dna.date = samples$date,
         trees = FluH1N1pdm2009$trees)

plotggphy(x, ladderize = TRUE, branch.unit = &quot;year&quot;,
          tip.color = &quot;location&quot;, tip.size = 3, tip.alpha = 0.75)
</code></pre>
<p></p>
<p>As I mentioned in the post, <a href="http://guangchuangyu.github.io/2016/09/ggtree-for-microbiome-data/">ggtree for microbiome data</a>, <a href="https://guangchuangyu.github.io/ggtree">ggtree</a> fits the <code>R</code> ecosystem in phylogenetic analysis. It serves as a general tools for annotating phylogenetic tree with different associated data from various sources. <code>obkData</code> object is also supported by <code>ggtree</code> and outbreak data stored in the object can be used to annotate the tree using grammar of graphics supported by <code>ggtree</code>.</p>
<pre><code>library(ggtree)
ggtree(x, mrsd=&quot;2009-09-30&quot;, as.Date=TRUE) +
    geom_tippoint(aes(color=location), size=3, alpha=.75) +
    scale_color_brewer(&quot;location&quot;, palette=&quot;Spectral&quot;) +
    theme_tree2(legend.position='right')
</code></pre>
<p></p>
<p>We can also associate the tree with other type of data that may come from experiments or evolution inference and use them to annotate the tree as demonstrated in the online vignettes.</p>
<h2>Citation</h2>
<p><strong>G Yu</strong>, DK Smith, H Zhu, Y Guan, TTY Lam*. <a href="http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12628/abstract">ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data</a>. <strong>Methods in Ecology and Evolution</strong>. <a href="http://dx.doi.org/10.1111/2041-210X.12628"><code>doi:10.1111/2041-210X.12628</code></a>.</p>
<p></p><div></div>