PolyGenius
Contents

visualize$genome$overview

One-call genome overview of a PRS library

Compute the default genome signals for a model library and stack their tracks in one call: the applied shortcut for the compute-then-stack workflow, readable at any library size.

Usage

visualize.genome.overview(
  models,
  gwas = NULL,
  model.associations = NULL,
  outcome = NULL,
  reference = NULL,
  attribution = FALSE,
  traits = NULL,
  top.n = NULL,
  region = NULL,
  bands = NULL,
  min.models = 2,
  max.labels = 40,
  heights = NULL
)

Arguments

ArgumentDescription
modelsA PGSLibrary or a single PGS. Any other class, or an empty set, aborts.
gwasA single-variant PolyGeniusAssociation from [associate$singleVariant()](/reference/associate-single-variant/), or NULL (default). Adds the Manhattan and convergence tracks and anchors concordance to the outcome; NULL omits both tracks. Recognized by a chr/position column on $results (the usual aliases accepted); a per-model regression passed here aborts by name rather than being silently ignored.
model.associationsA per-model PRS regression PolyGeniusAssociation from [associate$regression()](/reference/associate/), or NULL (default, sum over the whole library). Gates the convergence track to the FDR-significant models. Recognized by its predictor column; a single-variant result passed here aborts by name.
outcomeCharacter scalar, or NULL (default). Outcome selected in every association input; required when one of them holds more than one.
referenceCharacter scalar naming a model in models, or NULL (default). Used only when gwas is absent, where it anchors the concordance sign to that index model; NULL anchors to the canonical allele, leaving only the amount of agreement meaningful. List the choices with names(models$models).
attributionLogical scalar, default FALSE. Add the per-trait attribution lanes, which are off by default because they are unreadable at large library sizes. Has no effect without gwas.
traitsCharacter vector of trait names and a positive integer count, or NULL (default) for each. Narrow the attribution lanes, as for [visualize$genome$attribution](/reference/visualize-genome-attribution/); ignored when the attribution track is not drawn.
top.nCharacter vector of trait names and a positive integer count, or NULL (default) for each. Narrow the attribution lanes, as for [visualize$genome$attribution](/reference/visualize-genome-attribution/); ignored when the attribution track is not drawn.
regionA "chr:start-end" string, or NULL (default) for the whole genome. Passed through to the stack.
bandsIntervals to shade through every panel, or NULL (default). Passed through to the stack, which documents the accepted forms.
min.modelsNumeric scalar, default 2. Minimum number of carrying models for a variant to enter the concordance signal.
max.labelsNumeric scalar, default 40. Row-label cap for the attribution lanes.
heightsNumeric vector, or NULL (default, each track's own height). Relative panel heights, one per resulting track. The track count depends on which signals could be built, so set heights on a manual [stack](/reference/visualize-genome-stack/) instead when it matters.

Value

A patchwork composite, as visualize$genome$stack returns, with one panel per track that could be built. Apply a theme to every panel with &, not +.

Which tracks appear

Top to bottom: a coverage rail, showing where the library places variants; a single-variant Manhattan and a convergence track, both only when gwas is given; a concordance track, always; and the per-trait attribution lanes last, only when attribution = TRUE and gwas is given. Convergence is gated to the FDR-significant models when model.associations is also given. A track whose signal cannot be produced is dropped with a warning rather than failing the figure; if every track fails, all the recorded errors are raised together.

Examples

visualize$genome$overview(models, gwas = gwas, outcome = "dementia")
visualize$genome$overview(models, gwas = gwas, attribution = TRUE, top.n = 10)

See Also

Aliases: visualize.genome.overview, visualize$genome$overview, visualize_genome_overview