plot_pangenome_params: plot_pangenome_params

View source: R/plot_pangenome_params.R

plot_pangenome_paramsR Documentation

plot_pangenome_params

Description

Plots the estimated coefficients of the pangenome regression model(s). It is recommended that the compare_pangenomes function is used to formally compare the slopes of different pangenome datasets.

Usage

plot_pangenome_params(
  fit,
  boot_ci = TRUE,
  plot = TRUE,
  legend = TRUE,
  text_size = 14,
  color_pallete = 6
)

Arguments

fit

the result of running the 'panstripe' function. Multiple fits can be passed as a named list.

boot_ci

whether to use the estimated Bootstrap confidence intervals for the 'core' and 'tip' parameters (default=TRUE)

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'

Value

either a ggplot2 object or a 'data.frame' with the data needed to recreate the plot

Examples


sim <- simulate_pan(rate=1e-3)
fA <- panstripe(sim$pa, sim$tree, ci_type='perc')
plot_pangenome_params(fA, color_pallete=6)
sim <- simulate_pan(rate=1e-2)
fB <-panstripe(sim$pa, sim$tree, ci_type='perc')
plot_pangenome_params(list(a=fA,b=fB), color_pallete=6, boot_ci=TRUE)


gtonkinhill/panstripe documentation built on Feb. 27, 2025, 9:01 p.m.