Summary Statistics Imputation
Summary statistics imputation leverages linkage disequilibrium (LD) information to compute Z-scores of missing SNPs from neighbouring observed SNPs SNPs by taking advantage of the Linkage Disequilibrium.
We implemented the basic model from RAISS (Robust and Accurate Imputation from Summary Statistics) package (see the original paper).
The full repository for the RAISS package can be found here.
The original model was suggested in 2014 by Bogdan Pasaniuc et al. here.
It represents the following formula:
E(zi|z_t) = M{i,t} \cdot (M_{t,t})^{-1} \cdot z_t
Where:
-
E(z_i|z_t) represents the expected z-score of SNP 'i' given the observed z-scores at known SNP indexes 't'.
-
M_{i,t} represents the LD (Linkage Disequilibrium) matrix between SNP 'i' and the known SNPs at indexes 't'.
-
(M_{t,t})^{-1} represents the inverse of the LD matrix of the known SNPs at indexes 't'.
-
z_t represents the vector of observed z-scores at the known SNP indexes 't'.
gentropy.method.sumstat_imputation.SummaryStatisticsImputation
¶
Implementation of RAISS summary statstics imputation model.
Source code in src/gentropy/method/sumstat_imputation.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
|
raiss_model(z_scores_known: np.ndarray, ld_matrix_known: np.ndarray, ld_matrix_known_missing: np.ndarray, lamb: float = 0.01, rtol: float = 0.01) -> dict[str, Any]
staticmethod
¶
Compute the imputation of the z-score using the RAISS model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
z_scores_known |
ndarray
|
the vector of known Z scores |
required |
ld_matrix_known |
np.ndarray)
|
the matrix of known LD correlations |
required |
ld_matrix_known_missing |
ndarray
|
LD matrix of known SNPs with other unknown SNPs in large matrix (similar to ld[unknowns, :][:,known]) |
required |
lamb |
float
|
size of the small value added to the diagonal of the covariance matrix before inversion. Defaults to 0.01. |
0.01
|
rtol |
float
|
threshold to filter eigenvectos by its eigenvalue. It makes an inversion biased but much more numerically robust. Default to 0.01. |
0.01
|
Returns:
Type | Description |
---|---|
dict[str, Any]
|
dict[str, Any]: - var (np.ndarray): variance of the imputed SNPs - mu (np.ndarray): the estimation of the zscore of the imputed SNPs - ld_score (np.ndarray): the linkage disequilibrium score of the imputed SNPs - condition_number (np.ndarray): the condition number of the correlation matrix - correct_inversion (np.ndarray): a boolean array indicating if the inversion was successful - imputation_r2 (np.ndarray): the R2 of the imputation |
Source code in src/gentropy/method/sumstat_imputation.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
|