Learn R Programming

gap (version 1.6)

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

10,481

Version

1.6

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

August 27th, 2024

Functions in gap (1.6)

allele.recode

Allele recoding
asplot

Regional association plot
cis.vs.trans.classification

A cis/trans classifier
ReadGRMBin

A function to read GRM binary files
cnvplot

genomewide plot of CNVs
circos.cnvplot

circos plot of CNVs.
circos.cis.vs.trans.plot

circos plot of cis/trans classification
ccsize

Power and sample size for case-cohort design
chow.test

Chow's test for heterogeneity in two regressions
cs

Credible set
comp.score

score statistics for testing genetic linkage of quantitative trait
gcontrol

genomic control
gc.lambda

Estimation of the genomic control inflation statistic (lambda)
gc.em

Gene counting for haplotype analysis
h2.jags

Heritability estimation based on genomic relationship matrix using JAGS
grid2d

Two-dimensional grid
get_b_se

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

Get pve and its standard error from n, z
gap

Genetic analysis package
circos.mhtplot2

Another circos Manhattan plot
circos.mhtplot

circos Manhattan plot with gene annotation
gcontrol2

genomic control based on p values
snpHWE

Functions for single nucleotide polymorphisms
hap.em

Gene counting for haplotype analysis
genecounting

Gene counting for haplotype analysis
hap.score

Score statistics for association of traits with haplotypes
h2G

Heritability and its variance
ci2ms

Effect size and standard error from confidence interval
chr_pos_a1_a2

SNP id by chr:pos+a1/a2
h2GE

Heritability and its variance when there is an environment component
gcp

Permutation tests using GENECOUNTING
h2l

Heritability under the liability threshold model
h2_mzdz

Heritability estimation according to twin correlations
hg19

Chromosomal lengths for build 37
geno.recode

Genotype recoding
hg18

Chromosomal lengths for build 36
hwe.hardy

Hardy-Weinberg equilibrium test using MCMC
kin.morgan

kinship matrix for simple pedigree
hwe.cc

A likelihood ratio test of population Hardy-Weinberg equilibrium for case-control studies
invnormal

Inverse normal transformation
ixy

Conversion of chrosome name from strings
makeped

A function to prepare pedigrees in post-MAKEPED format
fbsize

Sample size for family-based linkage and association design
metareg

Fixed and random effects model for meta-analysis
metap

Meta-analysis of p values
klem

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

Sample size calculation for mediation analysis
hap

Haplotype reconstruction
hap.control

Control for haplotype reconstruction
mhtplot2

Manhattan plot with annotations
mhtplot.trunc

Truncated Manhattan plot
hwe.jags

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

log(p) for a normal deviate z
mia

Multiple imputation analysis for hap
log10pvalue

log10(p) for a P value including its scientific format
mht.control

Controls for mhtplot
inv_chr_pos_a1_a2

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

Miami plot
pbsize2

Power for case-control association design
pedtodot_verbatim

Pedigree-drawing with graphviz
pfc.sim

Probability of familial clustering of disease
pedtodot

Converting pedigree(s) to dot file(s)
qtl3dplotly

3D QTL plot
qtl2dplotly

2D QTL plotly
pgc

Preparing weight for GENECOUNTING
g2a

Conversion of a genotype identifier to alleles
miamiplot2

Miami Plot
qtl2dplot

2D QTL plot
mr

Mendelian randomization analysis
pfc

Probability of familial clustering of disease
qqunif

Q-Q plot for uniformly distributed random variable
hg38

Chromosomal lengths for build 38
gif

Kinship coefficient and genetic index of familiality
get_sdy

Get sd(y) from AF, n, b, se
hmht.control

Controls for highlights
log10p

log10(p) for a normal deviate z
mhtplot

Manhattan plot
hwe

Hardy-Weinberg equlibrium test for a multiallelic marker
labelManhattan

Annotate Manhattan or Miami Plot
mtdt2

Transmission/disequilibrium test of a multiallelic marker by Bradley-Terry model
plot.hap.score

Plot haplotype frequencies versus haplotype score statistics
whscore

Whittemore-Halpern scores for allele-sharing
tscc

Power calculation for two-stage case-control design
muvar

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

Haplotype trend regression
mvmeta

Multivariate meta-analysis based on generalized least squares
qtlClassifier

A QTL cis/trans classifier
revStrand

Allele on the reverse strand
read.ms.output

A utility function to read ms output
runshinygap

Start shinygap
pbsize

Power for population-based association design
print.hap.score

Print a hap.score object
snptest_sample

A utility to generate SNPTEST sample file
qtlFinder

Distance-based signal identification
mr_forestplot

Mendelian Randomization forest plot
sentinels

Sentinel identification from GWAS summary statistics
s2k

Statistics for 2 by K table
pvalue

P value for a normal deviate
mtdt

Transmission/disequilibrium test of a multiallelic marker
xy

Conversion of chromosome names to strings
qqfun

Quantile-comparison plots
LDkl

LD statistics for two multiallelic markers
ReadGRM

A function to read GRM file
KCC

Disease prevalences in cases and controls
WriteGRMBin

A function to write GRM binary file
METAL_forestplot

forest plot as R/meta's forest for METAL outputs
WriteGRM

A function to write GRM file
LD22

LD statistics for two diallelic markers
MCMCgrm

Mixed modeling with genetic relationship matrices
b2r

Obtain correlation coefficients and their variance-covariances
ESplot

Effect-size plot
FPRP

False-positive report probability
BFDP

Bayesian false-discovery probability
a2g

Allele-to-genotype conversion
bt

Bradley-Terry model for contingency table
ab

Test/Power calculation for mediating effect
AE3

AE model using nuclear family trios