Reconcile Two Collections to Their Shared Variants
Source:R/AllGenerics.R, R/AllClasses.R
intersectVariants.RdRestrict two fine-mapping collections to the variants they have in common, renormalizing each retained single-effect posterior over the variants that survive.
Usage
intersectVariants(x, y, oneSided = FALSE, ...)
# S4 method for class 'FineMappingResultBase,FineMappingResultBase'
intersectVariants(x, y, oneSided = FALSE, ...)Value
With oneSided = FALSE, a list of the two reconciled
collections named x and y. With oneSided = TRUE,
the reconciled x.
Details
subsetRegion() restricts ONE object to a window; this
intersects TWO objects against each other. Coloc needs it symmetric –
both sides must be scored on the same variant set – while TWAS, MR and
cTWAS need it one-sided, adjusting the QTL side to the GWAS variant set
and leaving the GWAS side alone.
Reconciliation renormalizes the STORED alpha rather than rebuilding it
from lbf_variable: alpha already carries the fit's prior, so
restricting and renormalizing is exact for any prior weights, whereas the
rebuild silently substitutes a uniform one.
Renormalizing matches a refit rather than approximating one – a refit on
the retained set normalizes the same single-effect regression over the
same variants. What it cannot recover is the information the dropped
variants carried: coverage falls as overlap shrinks, equally for both, and
that degradation is irreducible rather than an artifact of the method.
getRetainedMass() is what makes it visible.