PolyGenius
Contents

compute$genome$convergence

Convergent outcome signal across the model library

Shows where along the genome the model library's outcome signal concentrates. For each variant it sums |weight x outcome effect| over the models that carry it -- the same quantity compute$genome$attribution lays out per trait, collapsed across traits.

Usage

compute$genome$convergence(
  models,
  gwas,
  associations = NULL,
  outcome = NULL,
  fdr = 0.05
)

Arguments

ArgumentDescription
modelsA PGSLibrary or a single PGS, whose weights are attributed.
gwasA single-variant [PolyGeniusAssociation](/reference/polygeniusassociation/) (associate$singleVariant() or its meta) supplying the per-variant outcome effect. Required; aborts when none of its variants overlap models.
associationsA per-model PGS regression [PolyGeniusAssociation](/reference/polygeniusassociation/) carrying predictor and pval (e.g. from associate$regression() or associate$meta()), or NULL (default) to let every model contribute. Its predictor names must equal the (uniquified) model names.
outcomeCharacter scalar, or NULL (default). Selects one outcome when an association input holds several, and is required in that case.
fdrNumeric scalar, default 0.05. False-discovery-rate threshold for the associations gate. The association's own adj.pval is used only when it is populated for every model; otherwise Benjamini-Hochberg is applied across the per-model strongest effects, so fdr always controls the FDR. Aborts when no model clears it, and when no variant of the surviving models overlaps gwas.

Value

A PolyGeniusGenomeSignal with statistic = "convergence", resolution = "variant", bin.reduce = "sum" and frame = "absolute". $results has one row per variant that at least one contributing model carries and gwas covers, with chr, position, nea, ea, value and n.models. $diagnostics holds n.ambiguous (strand-ambiguous model rows dropped) and gated (whether associations was supplied).

Details

A locus is tall only where models place real, outcome-relevant weight, so -- unlike a sum of raw -log10 p -- a cloud of near-null LD/clumping variants does not inflate it. Supplying associations gates the sum to the FDR-significant models, so the track shows where the outcome-predictive PRSs concentrate; omitting it sums over the whole library. n.models travels with each row, so a reader can tell one strongly-attributing model from many moderate ones.

Examples

gwas <- associate$singleVariant(data, phenotypes = AD)
prs  <- associate$regression(data, outcomes = AD)

# Every model contributes
sig <- compute$genome$convergence(data$library, gwas = gwas)

# Only the models whose PRS is outcome-predictive at 5% FDR
sig.gated <- compute$genome$convergence(data$library, gwas = gwas, associations = prs)
visualize$genome$convergence(sig.gated)

See Also

Aliases: compute.genome.convergence, compute$genome$convergence, compute_genome_convergence