vignettes/exampleRec.Rmd
exampleRec.Rmd
library(BactDating)
library(ape)
set.seed(0)
A ClonalFrameML output can be read using:
t=loadCFML(prefix='cfml-output')
A Gubbins output can be read using:
t=loadGubbins(prefix='gubbins-output')
Instead, for the purpose of making this vignette self-contained, we will simulate an output from a recombination analysis. This is just an object of class phylo
, unrooted and with the added field unrec
representing the proportion that is unrecombined for each branch.
dates=1990:2010
truetree=simcoaltree(dates)
t=unroot(simobsphy(truetree))
t$unrec=runif(length(t$edge.length))
plot(t)
axisPhylo(backward = F)
edgelabels(round(100*t$unrec))