raiss.stat_models
This module contain the statistical library for imputation.
Notation style of matrices subset and vectors are based on the publication:
Bogdan Pasaniuc, Noah Zaitlen, Huwenbo Shi, Gaurav Bhatia, Alexander Gusev, Joseph Pickrell, Joel Hirschhorn, David P. Strachan, Nick Patterson, Alkes L. Price; Fast and accurate imputation of summary statistics enhances evidence of functional enrichment, Bioinformatics, Volume 30, Issue 20, 15 October 2014, Pages 2906–2914
Functions
|
|
|
Compute the estimation of z-score from neighborring snp |
|
Compute the expected variance of the imputed SNPs :param sig_i_t: correlation matrix with line corresponding to :type sig_i_t: matrix? :param unknown Snp: :type unknown Snp: snp to impute :param sig_t_inv: inverse of the correlation matrix of known :type sig_t_inv: np.ndarray :param matrix: :param lamb: regularization term added to matrix :type lamb: float |
|
|
|
Compute the variance :param zt: the vector of known Z scores :type zt: np.array :param sig_t: the matrix of known Linkage desiquilibrium correlation :type sig_t: np.ndarray :param sig_i_t: correlation matrix of known matrix :type sig_i_t: np.ndarray :param lamb: regularization term added to the diagonal of the sig_t matrix :type lamb: float :param rtol: threshold to filter eigenvector with a eigenvalue under rtol :type rtol: float :param make inversion biased but much more numerically robust: |
|
Forces the variance to be in the 0 to 1+lambda boundary theoritically we shouldn't have to do that |