PolyGenius
Contents

compute$genome$attribution

Per-trait genomic attribution of the outcome signal

Localizes where on the genome each trait-PRS's outcome signal sits. For every (model, variant) it multiplies the model's harmonized weight by that variant's own single-variant outcome effect, both oriented to the same canonical allele, so a model contributes at a locus in proportion to how much the locus pushes both its PRS and the outcome.

Usage

compute$genome$attribution(associations, models, outcome = NULL)

Arguments

ArgumentDescription
associationsA single-variant [PolyGeniusAssociation](/reference/polygeniusassociation/) (associate$singleVariant() or its meta), carrying chr, position, an effect and other allele, and a per-variant effect. Aborts when those columns are absent, or when none of its variants overlap models.
modelsA PGSLibrary or a single PGS, whose weights are attributed.
outcomeCharacter scalar, or NULL (default). Selects one outcome when associations holds several, and is required in that case.

Value

A PolyGeniusGenomeSignal with statistic = "attribution", resolution = "variant", bin.reduce = "sum" and frame = "absolute". $results is per (variant, model): chr, position, nea, ea, group (the model name) and value (weight x single-variant effect), one row per overlapping pair rather than one per locus. $diagnostics holds n.ambiguous (strand-ambiguous model rows dropped) and n.ambiguous.sv (single-variant rows dropped for the same reason), kept separate so a silently dropped GWAS row stays visible.

Details

Heuristic, not a decomposition. This uses each variant's marginal single-variant effect, ignoring LD and joint structure, so it approximates rather than partitions a PRS's outcome association. It answers "which loci co-drive this trait-PRS and the outcome" for exploration, not a variance decomposition. Effect signs are meaningful, since both sides are harmonized to the larger canonical allele; magnitudes inherit the single-variant effect's scale.

Cross-model scale. Each lane's magnitude also carries that model's own weight scale, which is not comparable across traits, phenotype scales or algorithms (log-odds versus standardized versus shrunken-posterior weights) -- the same caveat as compute$genome$cumulativeWeight. A taller lane therefore need not mean a stronger biological effect: compare loci within a lane, and across lanes only for a same-scale, same-algorithm library.

Examples

gwas <- associate$singleVariant(data, phenotypes = AD)
sig  <- compute$genome$attribution(gwas, data$library)
visualize$genome$attribution(sig)

See Also

Aliases: compute.genome.attribution, compute$genome$attribution, compute_genome_attribution