PolyGenius
Contents

compute$genome$concordance

Cross-trait directional concordance along the genome

Reduces a PGS library to a per-variant PolyGeniusGenomeSignal measuring whether the models that carry a variant agree on its harmonized effect direction, each model's vote weighted by the magnitude of the weight it places there. The signal stores the signed, sum-reducible pair value.num = sum(oriented beta) and value.den = sum(|beta|), whose ratio S = value.num / value.den lies in [-1, 1].

Usage

compute$genome$concordance(
  models,
  anchor = NULL,
  gwas = NULL,
  reference = NULL,
  outcome = NULL,
  min.models = 2
)

Arguments

ArgumentDescription
modelsA PGSLibrary or a single PGS. Anything else aborts, as does an empty PGS library.
anchorOne of "outcome", "reference", "none", or NULL (default). NULL auto-selects "outcome" when gwas is supplied, else "reference" when reference is, else "none".
gwasA single-variant [PolyGeniusAssociation](/reference/polygeniusassociation/) (associate$singleVariant() or its meta), or NULL (default). Supplies the per-variant outcome effect that orients + to the risk allele. Required when anchor = "outcome", and aborts when none of its variants overlap models.
referenceCharacter scalar naming one model within models, or NULL (default). Required when anchor = "reference"; aborts when the name is not in models or shares no variant with the other models.
outcomeCharacter scalar, or NULL (default). Selects one outcome when gwas holds several, and is required in that case.
min.modelsNumeric scalar, default 2. Minimum number of models a variant must appear in to be kept; a variant in one model agrees with itself trivially. Must be at least 1, and the call aborts when no variant clears it with non-zero weight.

Value

A PolyGeniusGenomeSignal with statistic = "concordance", resolution = "variant" and bin.reduce = "sum". $results has one row per retained variant, with chr, position, nea, ea, value.num, value.den and n.models. $metadata$anchor records the sign reference, and $metadata$frame is "relative" under anchor = "reference" and "absolute" otherwise. $diagnostics holds n.ambiguous (strand-ambiguous rows the harmonizer dropped, counted once per model occurrence, including the excluded reference model's own), anchor and reference.

Details

|S| -> 1 when the carrying models agree on direction and that agreement carries real weight; S is near 0 when they are split or the weights are near-null. Because a vote is weighted by |beta|, a shrunken ~0 weight votes ~0, so a split locus reflects genuine cross-trait disagreement rather than the sign of numerical noise. Numerator and denominator are summed and divided per display bin, so the ratio re-aggregates correctly at any bin width.

Low |S| is hypothesis-generating for antagonistic pleiotropy, but it also arises from ordinary cross-trait direction differences in a multi-trait library. Read split loci as candidates, especially where the carrying weight is high.

Anchor -- what the sign means

anchor sets the reference the +/- sign is read against. |S|, the amount of agreement, is the same under every anchor; only the sign's orientation changes.

  • "outcome" orients + to the outcome risk-increasing allele, taken from gwas. S > 0 means the carrying models agree on pushing outcome risk up, S < 0 protective, near 0 split. This is the reading that ties the track to the outcome the PRS-WAS was run against.
  • "reference" orients + to the effect direction of the one index model named in reference, which is itself excluded from the vote; S then reads as agreement with that anchor (+1 agrees, -1 opposes).
  • "none" orients on the canonical (lexicographically larger) allele, so the sign is an arbitrary allele convention with no clinical meaning -- read |S| only.

Examples

# Agreement on the outcome-risk direction, anchored on a single-variant scan
gwas <- associate$singleVariant(data, phenotypes = AD)
sig <- compute$genome$concordance(data$library, gwas = gwas)
visualize$genome$concordance(sig)

# Agreement with one index model instead; the anchor is inferred from `reference`
sig.ref <- compute$genome$concordance(data$library, reference = "LDpred2_AD")

See Also

Aliases: compute.genome.concordance, compute$genome$concordance, compute_genome_concordance