extract_results_bGWAS: Extract SNPs results from bGWAS results

View source: R/bGWAS_classFunctions.R

extract_results_bGWASR Documentation

Extract SNPs results from bGWAS results

Description

Extracts SNPs results from bGWAS results (BFs, p-value, prior, posterior and direct effects, depending on the value of the parameter results)

Usage

extract_results_bGWAS(obj, SNPs = "significant", results = "BF")

Arguments

obj

an object of class bGWAS created using bGWAS()

SNPs,

"all" / "significant", default="significant"

results,

"BF" / "posterior" / "direct" / "everything", default="BF"

Details

For all value of results, basic informations about the SNPs will be returned:
rsid : rs number
chrm_UK10K : chromosome (obtained from UK10K data)
pos_UK10K : position (obtained from UK10K data)
alt : alternative (effect) allele
ref : reference allele
beta : observed effect size (if possible)
se : observed effect size (if possible)
z_obs : observed Z-score

In addition, if results = "BF" the following information will be returned:
mu_prior_estimate : prior effect estimate (z-score scale)
mu_prior_std_error : prior effect standard error (z-score scale)
beta_prior_estimate : prior effect estimate (beta scale, if possible)
beta_prior_std_error : prior effect standard error (beta scale, if possible)
BF : Bayes Factor
BF_p : Bayes Factor p-value
BF_fdr : Bayes Factor FDR (only if FDR used to identify significant SNPs)

Alternatively, if results = "posterior" the following information will be returned:
mu_posterior_estimate : posterior effect estimate (z-score scale)
mu_posterior_std_error : posterior effect standard error (z-score scale)
beta_posterior_estimate : posterior effect estimate (beta scale, if possible)
beta_posterior_std_error : posterior effect standard error (beta scale, if possible)
z_posterior : posterior Z-score
p_posterior : posterior effect p-value
fdr_posterior : posterior effect FDR (only if FDR used to identify significant SNPs)

Alternatively, if results = "direct" the following information will be returned:
mu_direct_estimate : direct effect estimate (z-score scale)
mu_direct_std_error : direct effect standard error (z-score scale)
beta_direct_estimate : direct effect estimate (beta scale, if possible)
beta_direct_std_error : direct effect standard error (beta scale, if possible)
z_direct : direct Z-score
p_direct : direct effect p-value
fdr_direct : direct effect FDR (only if FDR used to identify significant SNPs)
CRR : corrected to raw ratio (ratio between direct effect and observed effect)

Alternatively, if results = "everything" all the results described above will be returned (possible only if SNPs = "all").

Value

a tibble containing the results for all / significant SNPs


n-mounier/bGWAS documentation built on Oct. 11, 2023, 1:39 a.m.