- Notifications
You must be signed in to change notification settings - Fork3
sinarueeger/GWAS.utils
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
GWAS.utils
is an R package with basic helper functions for manipulating GWAS data, including two GWAS datasets.
To get started, please refer to thisvignette.
remotes::install_github("sinarueeger/GWAS.utils")
Install including vignettes:
remotes::install_github("sinarueeger/GWAS.utils", build = TRUE, build_opts = c("--no-resave-data", "--no-manual"))vignette("gwas-utils-package")
Note: The vignette needs to have theRmpfr
package installed. Use anold version if you have not updated R in a while.
There are six functions:
eaf2maf(eaf = eaf_vec)
: Transforms effect allele frequencies into minor allele frequencies.inv_normal(x = vec)
: Inverse normal transformation of a variable.z2p(z = z_vec)
: Transforms Z-statistics to P-values, includes an option for very large Z-statistics.eff_nbr_tests(mat = genotype_df)
: Calculates the effective number of tests of a GWAS, based on the correlation between the SNPs.QQplot(p = p_vec)
: Q-Q-plot of P-values (uniformly distributed under the null).genomic_inflation(Z = z_vec)
: Calculates genomic inflation, with either P-values or Z-statistics.Most of the functions are just handy and trivial helper functions. ForQQplot()
andgenomic_inflation()
there are a number of other packages with similar functions, e.g.GenABEL
orqqman
. Ourgenomic_inflation
function takes two types of summary statistics as input by making an assumption about the P-value origin. AndQQplot
can inlcude the number of effective tests.
And two datasets:
giant
:Summary statistics of 10'000 SNPs from a GWAS in human body height.opensnp
data:Genotype data and human body height of 784 individuals from the publicly accessibleopenSNP database.
Please note that the 'GWAS.utils' project is released with aContributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
About
R package 📦 for handy functions when working with GWAS (summary) data