Contents
visualize$genome$concordance
Cross-trait directional concordance track
Renders a concordance PolyGeniusGenomeSignal as a signed genome track: one
point per variant at the consensus S = value.num / value.den in [-1, 1],
coloured on a diverging ramp and sized by n.models. Points near +/-1 are
loci where the carrying models agree on effect direction; the shaded band over
[-0.25, 0.25] marks split loci, candidates for antagonistic pleiotropy.
Usage
visualize.genome.concordance(
signal,
palette = NULL,
raster = FALSE,
raster.args = list(),
point.alpha = 0.8,
height = 2,
theme = c("polygenius", "none")
)Arguments
| Argument | Description |
|---|---|
signal | A PolyGeniusGenomeSignal with metadata$statistic == "concordance", from [compute$genome$concordance()](/reference/compute-genome-concordance/); any other statistic aborts, naming the producer to call. Reads chr, position, value.num, value.den and n.models from $results. |
palette | Character vector of two or more colours, a single colour or role/hue name, a colorRampPalette-style ramp function, or NULL (default). Diverging ramp for S; NULL uses the package diverging ramp. |
raster | Logical scalar, default FALSE. Draw the points with ggrastr::geom_point_rast() for genome-scale point counts; falls back to geom_point() with a warning when ggrastr is not installed. |
raster.args | Named list, default list(). Extra arguments forwarded to ggrastr::geom_point_rast(), over a default raster.dpi = 300. |
point.alpha | Numeric scalar in [0, 1], default 0.8. Point alpha. |
height | Numeric scalar, default 2. Relative panel height when stacked. |
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. Prints as a standalone plot and composes with
neither + nor draw(); stack it with
visualize$genome$stack.
Details
Axis and legend labels follow the anchor the signal recorded
(metadata$anchor, else diagnostics$anchor, else "none"):
protective/risk for "outcome", opposes/agrees against the recorded
reference model for "reference", and agree (-)/agree (+) for "none",
where only |S| is meaningful. S is a display division of two summed parts;
no statistic is computed here.
Examples
sig <- compute$genome$concordance(models, anchor = "outcome", gwas = gwas)
visualize$genome$concordance(sig)See Also
compute$genome$concordance(), which produces the input; visualize$genome$effects for the per-(model, variant) view of the same disagreement.
Other visualize-genome:
visualize.genome.attribution(),
visualize.genome.convergence(),
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()