Contents
visualize$genome$convergence
Convergent outcome-signal track
Renders a convergence PolyGeniusGenomeSignal as a binned area track: per
display bin, the summed |weight x outcome effect| the contributing models
place there. Tall bins are where the outcome-predictive PRSs concentrate.
Usage
visualize.genome.convergence(
signal,
binwidth = 1e+07,
reduce = c("bin", "window"),
window = NULL,
palette = NULL,
height = 1.5,
trans = NULL,
theme = c("polygenius", "none")
)Arguments
| Argument | Description |
|---|---|
signal | A PolyGeniusGenomeSignal with metadata$statistic == "convergence", from [compute$genome$convergence()](/reference/compute-genome-convergence/); any other statistic aborts, naming the producer to call. Reads chr, position and value from $results. |
binwidth | Numeric scalar (base pairs), default 1e7 (10 Mb). Display bin width. Superseded under a region = zoom on the stack, which re-bins to about 50 bins across the visible window. |
reduce | One of "bin" (default), "window". "bin" sums variants in disjoint bins; "window" sums overlapping windows, each variant contributing to every bin within +/- window/2, clipped to its chromosome. "window" is a moving sum, so it raises the absolute y-height by roughly window/binwidth. |
window | Numeric scalar (base pairs), or NULL (default). Smoothing width for reduce = "window"; NULL uses three times the display bin width. |
palette | Character vector of two or more colours, a single colour or role/hue name, or NULL (default). Bars alternate by chromosome in a two-tone, as the Manhattan track does. NULL uses the package colour plus neutral grey; a single colour replaces the primary tone; two or more colours (e.g. c("#045669", "#822B2A")) set both chromosome shades, first two used. |
height | Numeric scalar, default 1.5. Relative panel height when stacked. |
trans | One of "sqrt", "log10", or NULL (default, a linear axis). Y-axis transform, so one dominant bin (e.g. APOE) does not flatten the rest. "log10" is scales::pseudo_log_trans() with sigma set to the median non-zero bin of the rendered window: a bin near the background stays low and bins well above it are drawn on a log scale. Ticks sit at powers of ten. Each window derives its own sigma, so two panels compress differently and their shapes compare only through the tick labels. |
theme | One of "polygenius" (default), "none". Plot theme. "none" gives a bare theme_minimal() to style yourself; palette colors are applied either way. |
Value
A PolyGeniusGenomeTrack: the render spec (mark, data, params,
positions, height, label, build), with build taken from
signal$metadata$build. Binning runs at render, so a region = zoom re-bins
the visible window. Prints as a standalone plot; stack it with
visualize$genome$stack.
Examples
sig <- compute$genome$convergence(models, gwas, associations = assoc)
visualize$genome$convergence(sig, reduce = "window")See Also
compute$genome$convergence(), which produces the input; visualize$genome$attribution to break the same total down per trait.
Other visualize-genome:
visualize.genome.attribution(),
visualize.genome.concordance(),
visualize.genome.coverage(),
visualize.genome.cumulativeWeight(),
visualize.genome.effects(),
visualize.genome.loci(),
visualize.genome.manhattan(),
visualize.genome.overview(),
visualize.genome.prs(),
visualize.genome.reuse(),
visualize.genome.stack()