View source: R/plot_pangenome_cumulative.R
plot_pangenome_cumulative | R Documentation |
Plots the cumulative branch length versus the cumulative number of gene gain and loss events. This is similar to the style of plot produced by TempEst. This function plots only the data points as the fit can not be included as Panstripe models the individual branches rather than the cumulative total.
plot_pangenome_cumulative(
fit,
plot = TRUE,
legend = TRUE,
text_size = 14,
color_pallete = 6,
facet = FALSE,
smooth = FALSE
)
fit |
the result of running the 'panstripe' function. Multiple fits can be passed as a named list. |
plot |
whether to generate the plot (default) or return a data.frame |
legend |
toggles the display of the legend on and off |
text_size |
the base text size of the plot (default=14) |
color_pallete |
the pallete number passed to 'scale_fill_brewer' |
facet |
whether or not to generate separate plots for each pangenome (default=FALSE). |
smooth |
adds a linear line to aid the eye in seeing patters. This is NOT the model fit inferred by Panstripe. (default=FALSE) |
either a ggplot2 object or a 'data.frame' with the data needed to recreate the plot
sim <- simulate_pan(rate=1e-4)
fA <- panstripe(sim$pa, sim$tree, nboot=0)
plot_pangenome_cumulative(fA, color_pallete=6)
sim <- simulate_pan(rate=1e-3)
fB <-panstripe(sim$pa, sim$tree, nboot=0)
plot_pangenome_cumulative(list(a=fA,b=fB), color_pallete=6, smooth=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.