On this page
Inputs, alignment and priors
Choosing the right entry point depends on whether individual-level genotypes, sufficient statistics, or marginal summary statistics are available. In all cases, covariate adjustment should be performed prior to fine-mapping, and summary statistics must be aligned with the linkage disequilibrium (LD) matrix so that both share the exact same variant ordering and effect alleles.
While prusie validates array dimensions, data types, and numerical finiteness, it cannot infer allele orientation or population compatibility between summary statistics and an external LD reference. See Statistical model for how each input format maps to the working likelihood and effect scale.
Supported model and input routes
prusie fits Gaussian SuSiE models on CPU in double precision (float64). The table below summarizes the primary entry points and how they construct the working regression quantities:
| Entry point | Inputs | Working scale and interpretation |
|---|---|---|
susie |
X, y |
Individual-level regression with optional centering (intercept=True) and predictor standardization (standardize=True) |
susie_suff_stat |
XtX, Xty, yty, n |
Exact sufficient statistics computed from centered individual-level data |
susie_rss |
z (or bhat, shat), R, n |
Standardized working scale using the finite-sample Wald adjustment (z_method="wald") by default |
susie_rss |
bhat, shat, R, n, var_y |
Reconstructs original regression scale; coef returns effects per predictor unit in phenotype units |
susie_rss |
z, R, n, var_y |
Scales yty and default initial variances by var_y, while keeping -based XtX and Xty on the standardized scale |
susie_rss |
z (or bhat, shat), R (without n) |
Large-sample noncentrality likelihood; emits a warning and uses prior_variance |
susie_rss_lambda |
z, R (or reference X), lambda_ |
Regularized RSS with a fixed or estimated isotropic covariance term |
susie_ser |
z (or bhat, shat) |
Standalone single-effect regression without LD |
For individual-level susie, rows of X correspond to samples and columns to variants. SciPy sparse matrices (csc_matrix or csr_matrix) are operated on directly without densifying. Passing na_rm=True drops samples with missing phenotypes (y), whereas genotype entries in X must be finite.
For single-panel susie_rss, you can supply either marginal -scores z or effect estimates bhat with standard errors shat (from which is formed). When the sample size n is provided, z_method="wald" applies the finite-sample Wald adjustment, whereas z_method="score" uses unadjusted -scores; see From summaries to working sufficient statistics.
Instead of a precomputed LD matrix R, susie_rss can also accept a reference genotype matrix X (whose sample size need not equal n). Standard single-panel RSS fits apply X via matrix-free operators without forming a dense LD matrix, whereas models requiring explicit covariance manipulations—such as bhat/shat/var_y scale reconstruction, R_finite, R_mismatch, multi-panel RSS, and susie_rss_lambda—materialize a dense correlation matrix from X. See additional model options and shared fitting options.
Shapes and numerical checks
For susie_rss and susie_suff_stat with variants, 1D summary vectors (z, bhat, Xty) must have length , and square matrices (R, XtX) must have shape . If variant_ids are provided, they are coerced to strings and must contain unique, non-empty identifiers. Columns in variant_metadata must also have length and are preserved in the returned result.
Summary-statistic validation follows consistent numerical rules across entry points:
- Effect estimates and standard errors (
bhat,shat):bhatmust be finite.shatmay be a positive scalar or a length- vector of positive values withoutNaNs;+infis permitted inshatand yieldsz = 0. - Marginal -scores (
z): Missing values (NaN) are replaced with0with aRuntimeWarning; infinite values raiseValueError. - Sufficient statistics (
XtX,Xty,yty,n): Require and finite nonnegativeyty. Whencheck_input=False(the default),NaNentries inXtyare zeroed with aRuntimeWarning; whencheck_input=True, they raiseValueError. Ifyty = 0,Xtymust be all zeros,residual_variancemust be explicitly positive, andestimate_residual_variance=Falseis required. ProvidingX_colmeansandy_meanallowsprusieto recover the original-scale intercept (otherwisefit.interceptisNaN; see Data, notation and scale). - LD and Gram matrices (
R,XtX): Entries must be finite with nonnegative diagonals (singular matrices are permitted). Symmetry is checked on the working matrix (XtX = (n - 1) * Rwhennis given, orRwithoutn). If off-diagonal pairs and differ,prusieemits aRuntimeWarningand symmetrizes the working matrix as . On thebhat/shat/n/var_yroute, the reconstructedXtXis always symmetrized.
By default, caller arrays are never modified in place. Setting overwrite_ld=True in susie_rss allows the solver to reuse R as an in-place workspace when symmetry repair is needed; see Optional LD workspace for usage requirements.
Setting check_input=True performs an additional eigendecomposition of the working matrix before standardization, rejecting negative eigenvalues at or below -r_tol (while allowing zero eigenvalues) and issuing a RuntimeWarning if the squared norm of Xty projected onto near-null eigenvectors (eigenvalues , where is float64 machine epsilon) exceeds .
Variant order and alleles
prusie aligns inputs strictly by array position rather than matching variant_ids across arguments. Any subsetting, reordering, or allele flipping must be applied consistently across z (or bhat), both dimensions of R (or XtX, or columns of X), prior_weights, maf, variant_ids, and variant_metadata.
When harmonizing summary statistics with an LD reference panel, resolve strand-ambiguous or palindromic variants prior to fitting. If a subset of variants has reversed effect alleles relative to the LD matrix, let signs be a length- vector with -1 at flipped variants and +1 elsewhere, and update both the summary statistics and LD matrix:
z_new = signs * z
R_new = signs[:, None] * R * signs[None, :]
For bhat/shat inputs, multiply bhat by signs and leave shat unchanged.
To filter variants by minor allele frequency during input preparation, pass maf (and optionally maf_thresh, default 0.0) to susie_rss or susie_suff_stat. Variants with maf > maf_thresh are retained across all arrays and metadata.
Priors and zero-information columns
In susie, susie_suff_stat, and susie_rss (with known n), scaled_prior_variance specifies the initial effect-size prior variance relative to the working phenotype variance and accepts either a positive scalar or a length- vector (see A sum of single effects). When n is omitted in susie_rss, prior_variance is used instead.
prior_weights specifies nonnegative prior inclusion weights for the variants (uniform by default) and is normalized to sum to 1 (). Setting a positive null_weight () appends a virtual null column with zero crossproducts, assigning prior weight to the null column and rescaling the unnormalized variant weights by before normalizing the combined length- vector. Always pass only the biological variants in variant_ids and variant_metadata.
Following susieR, the Gaussian single-effect regression evaluates log prior weights as , where is float64 machine epsilon. Consequently, setting a variant's prior weight to 0 does not strictly exclude it from receiving posterior mass; to exclude a variant completely, filter it out of the inputs as described in Variant order and alleles. Similarly, uninformative columns with zero working diagonal () receive a log Bayes factor of 0 and conditional moments of 0, though their posterior inclusion probability remains proportional to their prior weight. Note that fit.lbf_variable records per-variant log Bayes factors prior to weighting by .
To warm-start a fit from a previous SusieResult or a dictionary containing alpha, mu, and mu2, pass model_init (or its alias s_init). prusie verifies that variant identifiers, scales, and null-column layout match the new inputs. See Continue first, then consider refinement for the distinction between warm-starting a new fit and continuing a fit with retained data.
Choosing variance and iteration settings
By default, susie and susie_suff_stat estimate the residual variance (estimate_residual_variance=True), whereas susie_rss fixes (estimate_residual_variance=False) because estimating residual variance from summary statistics requires in-sample LD and can become unstable with external reference panels. See ELBO and residual variance for update formulas and bounds.
In susie_rss and susie_rss_lambda, check_prior=True (enabled by default) checks after each IBSS sweep that no component prior variance exceeds
raising a ValueError if an extreme variance indicates severe mismatch between the summary statistics and LD matrix.
The maximum number of IBSS sweeps defaults to max_iter=100 for susie and susie_suff_stat and max_iter=50 for susie_rss and susie_rss_lambda. The default convergence tolerance is tol=1e-4 (1e-6 when tol=None is paired with estimate_residual_method="NIG", and 1e-3 for susie_rss_lambda). See Stopping rules, Defaults by entry point, and Iterations and finalization for details on convergence criteria, component trimming, and memory usage.