As first reported [Zhao, J. H. 2007. "gap: Genetic Analysis Package". JSS 23(8):1-18. tools:::Rd_expr_doi("10.18637/jss.v023.i08")], it is designed as an integrated package for genetic data analysis of both population and family data. Currently, it contains functions for sample size calculations of both population-based and family-based designs, probability of familial disease aggregation, kinship calculation, statistics in linkage analysis, and association analysis involving genetic markers including haplotype analysis with or without environmental covariates. Over years, the package has been developed in-between many projects hence also in line with the name (gap).
Jing Hua Zhao in collaboration with other colleagues, and with help from Kurt Hornik and Brian Ripley of the R core development team
maitained by Jing Hua Zhao <jinghuazhao@hotmail.com>
Package: | gap |
Version: | 1.5-1 |
Depends: | R(>= 2.1.0) |
Imports: | dplyr, ggplot2, plotly |
Suggests: | BradleyTerry2, MASS, Matrix, MCMCglmm, R2jags, bdsmatrix, bookdown, |
calibrate, circlize, coda, cowplot, coxme, dplyr, foreign, forestplot, | |
gap.datasets, ggplot2, grid, haplo.stats, htmlwidgets, kinship2, lattice, | |
magic, matrixStats, meta, metafor, nlme, pedigree, pedigreemm, | |
plotrix, qqman, regress, reshape, rmarkdown, rmeta, rms, survival | |
License: | GPL (>=2) |
URL: | https://jinghuazhao.github.io/R |
Index:
ANALYSIS | |
AE3 | |
AE model using nuclear family trios | bt |
Bradley-Terry model for contingency table | ccsize |
Power and sample size for case-cohort design | cs |
Credibel set | fbsize |
Sample size for family-based linkage and association design | gc.em |
Gene counting for haplotype analysis | gcontrol |
genomic control | gcontrol2 |
genomic control based on p values | gcp |
Permutation tests using GENECOUNTING | gc.lambda |
Estimation of the genomic control inflation statistic (lambda) | genecounting |
Gene counting for haplotype analysis | gif |
Kinship coefficient and genetic index of familiality | hap |
Haplotype reconstruction | hap.em |
Gene counting for haplotype analysis | hap.score |
Score statistics for association of traits with haplotypes | htr |
Haplotype trend regression | h2.jags |
Heritability estimation based on genomic relationship matrix using JAGS | hwe |
Hardy-Weinberg equilibrium test for a multiallelic marker | hwe.cc |
A likelihood ratio test of population Hardy-Weinberg equilibrium | hwe.hardy |
Hardy-Weinberg equilibrium test using MCMC | hwe.jags |
Hardy-Weinberg equlibrium test for a multiallelic marker using JAGS | invnormal |
inverse Normal transformation | kin.morgan |
kinship matrix for simple pedigree | LD22 |
LD statistics for two diallelic markers | LDkl |
LD statistics for two multiallelic markers | lambda1000 |
A standardized estimate of the genomic inflation scaling to | |
a study of 1,000 cases and 1,000 controls | log10p |
log10(p) for a standard normal deviate | log10pvalue |
log10(p) for a P value including its scientific format | logp |
log(p) for a normal deviate | masize |
Sample size calculation for mediation analysis | MCMCgrm |
Mixed modeling with genetic relationship matrices | mia |
multiple imputation analysis for hap | mr |
Mendelian randomization analysis | mtdt |
Transmission/disequilibrium test of a multiallelic marker | mtdt2 |
Transmission/disequilibrium test of a multiallelic marker | |
by Bradley-Terry model | mvmeta |
Multivariate meta-analysis based on generalized least squares | pbsize |
Power for population-based association design | pbsize2 |
Power for case-control association design | pfc |
Probability of familial clustering of disease | pfc.sim |
Probability of familial clustering of disease | pgc |
Preparing weight for GENECOUNTING | print.hap.score |
Print a hap.score object | s2k |
Statistics for 2 by K table | sentinels |
Sentinel identification from GWAS summary statistics | tscc |
Power calculation for two-stage case-control design | |
GRAPHICS | |
asplot | Regional association plot |
ESplot | Effect-size plot |
circos.cis.vs.trans.plot | circos plot of cis/trans classification |
circos.cnvplot | circos plot of CNVs |
circos.mhtplot | circos Manhattan plot with gene annotation |
circos.mhtplot2 | Another circos Manhattan plot |
cnvplot | genomewide plot of CNVs |
labelManhattan | Annotate Manhattan or Miami Plot |
makeRLEplot | make relative log expression plot |
METAL_forestplot | forest plot as R/meta's forest for METAL outputs |
mhtplot | Manhattan plot |
mhtplot2 | Manhattan plot with annotations |
mhtplot.trunc | truncated Manhattan plot |
miamiplot | Miami plot |
miamiplot2 | Miami plot |
mr_forestplot | Mendelian Randomization forest plot |
pedtodot | Converting pedigree(s) to dot file(s) |
pedtodot_verbatim | Pedigree-drawing with graphviz |
plot.hap.score | Plot haplotype frequencies versus haplotype score statistics |
qqfun | Quantile-comparison plots |
qqunif | Q-Q plot for uniformly distributed random variable |
qtl2dplot | 2D QTL plot |
qtl2dplotly | 2D QTL plotly |
qtl3dplotly | 3D QTL plotly |
UTITLITIES | |
SNP | |
Functions for single nucleotide polymorphisms (SNPs) | BFDP |
Bayesian false-discovery probability | FPRP |
False-positive report probability | ab |
Test/Power calculation for mediating effect | b2r |
Obtain correlation coefficients and their variance-covariances | chow.test |
Chow's test for heterogeneity in two regressions | chr_pos_a1_a2 |
Form SNPID from chromosome, posistion and alleles | cis.vs.trans.classification |
a cis/trans classifier | comp.score |
score statistics for testing genetic linkage of quantitative trait | GRM functions |
ReadGRM, ReadGRMBin, ReadGRMPLINK, ReadGRMPCA, WriteGRM, | |
WriteGRMBin, WriteGRMSAS | |
handle genomic relationship matrix involving other software | get_b_se |
Get b and se from AF, n, and z | get_pve_se |
Get pve and its standard error from n, z | get_sdy |
Get sd(y) from AF, n, b, se | h2G |
A utility function for heritability | h2GE |
A utility function for heritability involving gene-environment interaction | h2l |
A utility function for converting observed heritability to its counterpart | |
under liability threshold model | h2_mzdz |
Heritability estimation according to twin correlations | klem |
Haplotype frequency estimation based on a genotype table | |
of two multiallelic markers | makeped |
A function to prepare pedigrees in post-MAKEPED format | metap |
Meta-analysis of p values | metareg |
Fixed and random effects model for meta-analysis | muvar |
Means and variances under 1- and 2- locus (diallelic) QTL model | qtlClassifier |
A QTL cis/trans classifier | read.ms.output |
A utility function to read ms output | revStrand |
Allele on the reverse strand | runshinygap |
Start shinygap | snptest_sample |
A utility to generate SNPTEST sample file | whscore |
Whittemore-Halpern scores for allele-sharing | weighted.median |
Weighted median with interpolation |
We have incorporated functions for a wide range of problems. Nevertheless, this largely remains as a preliminary work to be consolidated in the near future.
Zhao JH, gap: genetic analysis package. Journal of Statistical Software 2007, 23(8):1-18, tools:::Rd_expr_doi("10.18637/jss.v023.i08").
Useful links: