PolyGenius
Contents

visualize$models$sizes

Distribution of model sizes

Histogram of the number of distinct variants per model across a PGS library, on a log10 x-axis. Counts are taken after cross-model allele harmonization, so a variant recorded with swapped alleles in two models counts once, and strand-ambiguous variants (A/T, C/G) are excluded.

Usage

visualize.models.sizes(
  models,
  bins = 40,
  palette = NULL,
  theme = c("polygenius", "none")
)

Arguments

ArgumentDescription
modelsA PGSLibrary or a single PGS. Any other class, or an empty PGS library, aborts. A set spanning two genome builds is refused by the backbone accessor.
binsNumeric scalar, default 40. Number of histogram bins.
paletteBar fill: NULL (default) or a single colour (name or hex, e.g. "darkgreen") fills every bar flat; two or more colours (e.g. c("lightgrey", "darkgreen")) or a colorRampPalette-style ramp function fills them with a gradient keyed to bar height, taller bars at the high end of the ramp. Anything else aborts. See [visualize](/reference/visualize/).
themeOne of "polygenius" (default), "none". Plot theme. "none" gives a bare theme_minimal() to style yourself; palette colors are applied either way.

Value

A ggplot object, so it composes with +.

Examples

visualize$models$sizes(models, bins = 20)

See Also

visualize$models$reuse for the same model set seen from the variant side; generate$models() to build one.

Other visualize-models: visualize.models.reuse(), visualize.models.top.variants(), visualize.models.uniqueness()

Aliases: visualize.models.sizes, visualize$models$sizes, visualize_models_sizes