Skip to contents

Restrict 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, ...)

Arguments

x

A fine-mapping collection to reconcile.

y

The collection to reconcile it against.

oneSided

Logical (length 1). FALSE (default) returns both sides restricted to the shared variants. TRUE returns only x, adjusted to y's variants, leaving y untouched.

...

Additional arguments passed to methods.

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.

Examples

data(qtlFineMappingExample)
data(gwasFineMappingExample)
both <- intersectVariants(qtlFineMappingExample, gwasFineMappingExample)
names(both)
#> [1] "x" "y"