Learn R Programming

⚠️There's a newer version (1.6) of this package.Take me there.

gap (version 1.5)

Genetic Analysis Package

Description

As first reported [Zhao, J. H. 2007. "gap: Genetic Analysis Package". J Stat Soft 23(8):1-18. ], 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).

Copy Link

Version

Install

install.packages('gap')

Monthly Downloads

15,115

Version

1.5

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Jing Zhao

Last Published

January 13th, 2023

Functions in gap (1.5)

KCC

Disease prevalences in cases and controls
MCMCgrm

Mixed modeling with genetic relationship matrices
snp.ES

Functions for single nucleotide polymorphisms (SNPs)
FPRP

False-positive report probability
BFDP

Bayesian false-discovery probability
LD22

LD statistics for two diallelic markers
LDkl

LD statistics for two multiallelic markers
circos.mhtplot

circos Manhattan plot with gene annotation
circos.cnvplot

circos plot of CNVs.
ccsize

Power and sample size for case-cohort design
chr_pos_a1_a2

SNP id by chr:pos+a1/a2
METAL_forestplot

forest plot as R/meta's forest for METAL outputs
circos.cis.vs.trans.plot

circos plot of cis/trans classification
asplot

Regional association plot
chow.test

Chow's test for heterogeneity in two regressions
bt

Bradley-Terry model for contingency table
ab

Test/Power calculation for mediating effect
b2r

Obtain correlation coefficients and their variance-covariances
circos.mhtplot2

Another circos Manhattan plot
cs

Credible set
cnvplot

genomewide plot of CNVs
comp.score

score statistics for testing genetic linkage of quantitative trait
cis.vs.trans.classification

A cis/trans classifier
gc.em

Gene counting for haplotype analysis
gc.lambda

Estionmation of the genomic control inflation statistic (lambda)
gif

Kinship coefficient and genetic index of familiality
get_pve_se

Get pve and its standard error from n, z
get_b_se

Get b and se from AF, n, and z
get_sdy

Get sd(y) from AF, n, b, se
gcontrol2

genomic control based on p values
gcontrol

genomic control
fbsize

Sample size for family-based linkage and association design
gcp

Permutation tests using GENECOUNTING
h2.jags

Heritability estimation based on genomic relationship matrix using JAGS
grid2d

Two-dimensional grid
genecounting

Gene counting for haplotype analysis
gap-internal

Internal functions for gap
gap-package

Genetic analysis package
hap.score

Score statistics for association of traits with haplotypes
h2GE

Heritability and its variance when there is an environment component
h2G

Heritability and its variance
hap.em

Gene counting for haplotype analysis
klem

Haplotype frequency estimation based on a genotype table of two multiallelic markers
h2l

Heritability under the liability threshold model
hmht.control

Controls for highlights
h2_mzdz

Heritability estimation according to twin correlations
hwe

Hardy-Weinberg equlibrium test for a multiallelic marker
invnormal

Inverse normal transformation
inv_chr_pos_a1_a2

Retrieval of chr:pos+a1/a2 according to SNP id
ixy

Conversion of chrosome name from strings
hap.control

Control for haplotype reconstruction
hwe.hardy

Hardy-Weinberg equilibrium test using MCMC
kin.morgan

kinship matrix for simple pedigree
htr

Haplotype trend regression
hap

Haplotype reconstruction
hwe.cc

A likelihood ratio test of population Hardy-Weinberg equilibrium for case-control studies
hwe.jags

Hardy-Weinberg equlibrium test for a multiallelic marker using JAGS
log10p

log10(p) for a normal deviate z
labelManhattan

Annotate Manhattan or Miami Plot
log10pvalue

log10(p) for a P value including its scientific format
masize

Sample size calculation for mediation analysis
metap

Meta-analysis of p values
mht.control

Controls for mhtplot
logp

log(p) for a normal deviate z
mtdt2

Transmission/disequilibrium test of a multiallelic marker by Bradley-Terry model
mia

Multiple imputation analysis for hap
makeped

A function to prepare pedigrees in post-MAKEPED format
mtdt

Transmission/disequilibrium test of a multiallelic marker
mhtplot.trunc

Truncated Manhattan plot
mhtplot

Manhattan plot
metareg

Fixed and random effects model for meta-analysis
mvmeta

Multivariate meta-analysis based on generalized least squares
mhtplot2

Manhattan plot with annotations
miamiplot

Miami plot
muvar

Means and variances under 1- and 2- locus (biallelic) QTL model
mr_forestplot

Mendelian Randomization forest plot
mr

Mendelian randomization analysis
miamiplot2

Miami Plot
pedtodot

Converting pedigree(s) to dot file(s)
pfc.sim

Probability of familial clustering of disease
pfc

Probability of familial clustering of disease
pedtodot_verbatim

Pedigree-drawing with graphviz
qtl2dplot

2D QTL plot
qtl2dplotly

2D QTL plotly
pvalue

P value for a normal deviate
runshinygap

Start shinygap
s2k

Statistics for 2 by K table
print.hap.score

Print a hap.score object
revStrand

Allele on the reverse strand
plot.hap.score

Plot haplotype frequencies versus haplotype score statistics
pgc

Preparing weight for GENECOUNTING
read.ms.output

A utility function to read ms output
xy

Conversion of chromosome names to strings
qqunif

Q-Q plot for uniformly distributed random variable
qqfun

Quantile-comparison plots
snptest_sample

A utility to generate SNPTEST sample file
sentinels

Sentinel identification from GWAS summary statistics
qtl3dplotly

3D QTL plot
pbsize

Power for population-based association design
pbsize2

Power for case-control association design
whscore

Whittemore-Halpern scores for allele-sharing
qtlClassifier

A QTL cis/trans classifier
tscc

Power calculation for two-stage case-control design
AE3

AE model using nuclear family trios
ESplot

Effect-size plot