Skip to contents

Extracts coefficients from an existing SuSiE-inf fit or fits `susieR::susie()` with `unmappable_effects = "inf"`.

Usage

susieInfWeights(X = NULL, y = NULL, susieInfFit = NULL, retainFit = FALSE, ...)

Arguments

X

Genotype matrix. Required when `susieInfFit` is NULL.

y

Phenotype vector. Required when `susieInfFit` is NULL.

susieInfFit

Optional fitted SuSiE-inf object.

retainFit

If TRUE, stores the fitted object as an attribute on the returned weights.

...

Additional arguments passed to `susieR::susie()` when fitting.

Value

Numeric vector of variant weights.

Non-zero weights with zero PIPs

SuSiE-inf decomposes effects into a mappable component (driven by `alpha * mu`, reported as per-variant PIPs) and an infinitesimal component (driven by `theta`). When the fit converges with no mappable effects – all `V` and `mu` zero, so every `pip == 0` – the returned weights are still non-zero because `susieR::coef.susie` adds `theta / X_column_scale_factors` to the mappable coefficient. This is intentional: it captures diffuse polygenic signal that the mappable component could not localize to any credible set. Consumers that interpret per-variant PIPs as a gate on whether to use the weights should be aware that low or zero PIPs do not imply zero TWAS weights here.

Examples

data(eqtlRegionExample)
X <- eqtlRegionExample$X[, 1:30]
y <- eqtlRegionExample$yRes
susieInfWeights(X, y)
#> HINT: nrow(X) = 415 >= 2 * ncol(X) = 60. Consider precomputing sufficient statistics with compute_suff_stat() and fitting with susie_ss() instead -- this avoids holding X in memory at every iteration and lets you reuse XtX across multiple y.
#> chr22:32119788:T:C chr22:32119867:T:G chr22:32119961:T:G chr22:32120053:T:C 
#>                  0                  0                  0                  0 
#> chr22:32120593:A:G chr22:32120636:T:C chr22:32120932:G:A chr22:32120975:A:G 
#>                  0                  0                  0                  0 
#> chr22:32121290:C:T chr22:32121498:A:C chr22:32121635:T:G chr22:32121702:A:G 
#>                  0                  0                  0                  0 
#> chr22:32121936:G:A chr22:32122351:A:G chr22:32122676:A:G chr22:32123055:A:G 
#>                  0                  0                  0                  0 
#> chr22:32123164:T:C chr22:32123383:T:C chr22:32123461:T:C chr22:32123806:C:T 
#>                  0                  0                  0                  0 
#> chr22:32124049:G:A chr22:32124126:C:T chr22:32124147:A:C chr22:32124381:G:A 
#>                  0                  0                  0                  0 
#> chr22:32124644:A:G chr22:32124683:T:C chr22:32124952:C:A chr22:32125308:A:G 
#>                  0                  0                  0                  0 
#> chr22:32125638:A:C chr22:32125730:G:A 
#>                  0                  0