All functions
|
burren_imd_13_traits
|
Burren sparse basis files |
burren_imd_13_traits
|
Burren sparse basis files |
add_ref_annotations()
|
add_ref_annotations integrate GWAS summary data with support file
|
align_alleles()
|
align_alleles compute variance weighted euclidean distance between two PC loading vectors a and b
|
ambiguous()
|
ambiguous get ambiguous variants
|
burren_imd_13_traits
|
Burren sparse basis files |
burren_imd_13_traits
|
Burren sparse basis files |
comp()
|
comp get complement for a set of variants
|
compute_seb_proj_var()
|
analytically compute the variance of a projection given a standard error of beta for a given trait
compute_seb_proj_var |
compute_seb_proj_var_sparse()
|
analytically compute the variance of a projection given a standard error of beta for a given trait for sparse basis
compute_seb_proj_var_sparse |
compute_shrinkage_metrics()
|
This function computes various shrinkage metrics
compute_shrinkage_metrics computes various shrinkage metrics |
control_prior_shape()
|
This function computes shape parameters for beta distribution matching a binomial proportion B(n,f)/n
control_prior_shape shape parameters for beta distribution matching a binomial proportion B(n,f)/n |
cov_beta()
|
covariance matrix of betas for an ld block
cov_beta |
create_basis()
|
This function creates a basis
create_basis creates a trait snp matrix that is suitable for basis creation and projection |
create_ds_matrix()
|
This function creates a trait snp matrix
create_ts_matrix creates a trait snp matrix that is suitable for basis creation and projection |
e_lor()
|
This function computes expected log odds ratio for a set of shape parameters
e_lor computes expected log odds ratio for a set of shape parameters |
est_a1b1()
|
This function estimates shape parameters for a prior distribution of control allele frequencies
est_a1b1 estimate shape parameters a1,b1 |
flip_allele()
|
align_allele given a data.table of pid,a1,a2 get a list of SNPs where alleles are flipped wrt to basis reference
|
fopt()
|
This function computes the optimal shape parameter a1 for a given set of constraints
shape parameters estimate the P(OR > target.or).
fopt estimate the P(OR > target.or) given shape parameters for case and control allele frequency |
get_gwas_data()
|
get_gwas_data integrate GWAS summary data with support files
|
get_seb()
|
An internal helper function to get obtain standard error of beta estimates from a GWAS.DT data.frame object
get_seb |
logsum()
|
helper function to sum logs without loss of precision
logsum sums logs without loss of precision |
lor_constraint()
|
This function computes a probability for a given configuration of beta distribution
shape parameters estimate the P(OR > target.or).
lor_constraint estimate the P(OR > target.or) given shape parameters for case and control allele frequency |
lor_f()
|
This function samples from the posterior distribution of a given control allele frequency, for different genotype configurations
lor_f sample from log(or) posterior distribution given an allele frequency. |
lyons_egpa
|
EGPA combined GWAS summary statistics |
maf_se_estimate()
|
Compute minor allele frequency shrinkage
maf_se_estimate computes a shrinkage metric for a given list of minor allele frequencies' |
maf_se_estimate_sample_size()
|
Compute minor allele frequency shrinkage using sample size
maf_se_estimate_sample_size computes component of standard error of beta due to minor allele frequency |
mvs_perm()
|
Code to sample multivariate norm
mvs_perm sample from a multivariate normal distribution |
mvs_sigma()
|
Code to compute sigma - genotype covariance matrix
mvs_sigma create a geneotype convariance matrix |
opt_a1b1()
|
This function estimates shape parameters for a prior distribution of control allele frequencies
opt_a1b1 estimate shape parameters a1,b1 |
p2z()
|
convert p value to a signed Z score
p2z p value to a signed Z score |
post_lor()
|
This function samples from the posterior distribution of log(OR) based on the observation of a case genotype
post_lor samples from the posterior distribution of log(OR) given genotype. |
project_basis()
|
This function projects an aligned trait onto the basis
project_basis projects an external trait into basis space |
project_sparse()
|
A streamlined function to project a trait onto a sparse basis
project_sparse |
burren_imd_13_traits
|
Burren sparse basis files |
se_null()
|
This function computes standard error under the null
se_null analytically compute standard error of \(\beta\) under \(\mathbb{E}(\beta) = 0\)
\(\sqrt{\frac{1}{2fN_0} + \frac{1}{2N_{0}(1-f)} + \frac{1}{2fN_1} + \frac{1}{2N_{1}(1-f)} }\) |
burren_imd_13_traits
|
Burren sparse basis files |
simulate_beta()
|
simulate betas for an ld block
simulate_beta use the multivariate normal to simulate realistic betas |
simulate_study()
|
simulate betas for a study
simulate_study use the multivariate normal to simulate realistic betas for a study |
burren_imd_13_traits
|
Burren sparse basis files |
vcf2snpmatrix()
|
convert a vcf file to snpMatrix object
vcf2snpmatrix convert a vcf file to snpMatrix object |
wakefield_null_pp()
|
compute reciprocal posterior probabilities using Wakefield's approximate Bayes Factors
wakefield_null_pp computes posterior probabilities for a given SNP to be NOT be causal for a given SNP under the assumption of a single causal variant. |
wakefield_pp()
|
compute posterior probabilities using Wakefield's approximate Bayes Factors
wakefield_pp computes posterior probabilities for a given SNP to be causal for a given SNP under the assumption of a single causal variant. |
ws_shrinkage()
|
This function computes an alternative to the Bayesian shrinkage method which can be too agressive.
ws_shrinkage computes a shrinkage based on a weighted sum (ws) of posteriors for each disease
this is then normalised by the total posterior for a given LD block |
z2p()
|
convert z to p value
p2z z to p value |