Skip to contents

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

Usage

susieAshWeights(X = NULL, y = NULL, susieAshFit = NULL, retainFit = FALSE, ...)

Arguments

X

Genotype matrix. Required when `susieAshFit` is NULL.

y

Phenotype vector. Required when `susieAshFit` is NULL.

susieAshFit

Optional fitted SuSiE-ASH 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.

Examples

data(eqtlRegionExample)
X <- eqtlRegionExample$X[, 1:30]
y <- eqtlRegionExample$yRes
susieAshWeights(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.
#> HINT: For SuSiE-ash, slot_prior was not specified; using default Beta(a=1, b=2), roughly expecting ~3 of 10 slots to be active. Set slot_prior = slot_prior_betabinom(a, b) to override; for an uninformative prior use slot_prior_betabinom(1, 1).
#> chr22:32119788:T:C chr22:32119867:T:G chr22:32119961:T:G chr22:32120053:T:C 
#>      -4.948975e-04      -4.959149e-04       1.260941e-04      -7.967104e-05 
#> chr22:32120593:A:G chr22:32120636:T:C chr22:32120932:G:A chr22:32120975:A:G 
#>      -7.969909e-05      -2.211048e-04      -3.163462e-04       4.383009e-04 
#> chr22:32121290:C:T chr22:32121498:A:C chr22:32121635:T:G chr22:32121702:A:G 
#>      -6.600298e-05      -6.608065e-05      -1.207769e-04      -2.867932e-04 
#> chr22:32121936:G:A chr22:32122351:A:G chr22:32122676:A:G chr22:32123055:A:G 
#>      -8.104677e-05      -5.526831e-05      -1.208567e-04       4.384386e-04 
#> chr22:32123164:T:C chr22:32123383:T:C chr22:32123461:T:C chr22:32123806:C:T 
#>      -9.938075e-05      -9.841910e-05       4.029269e-04      -9.856865e-05 
#> chr22:32124049:G:A chr22:32124126:C:T chr22:32124147:A:C chr22:32124381:G:A 
#>      -9.871971e-05      -2.217275e-04      -9.891881e-05       2.725441e-05 
#> chr22:32124644:A:G chr22:32124683:T:C chr22:32124952:C:A chr22:32125308:A:G 
#>      -8.188025e-05      -2.220582e-04      -8.991323e-04      -3.720680e-04 
#> chr22:32125638:A:C chr22:32125730:G:A 
#>       2.285538e-04       3.011050e-04