gtx: Genetics ToolboX

Assorted tools for genetic association analyses. The current focus is on implementing (either exactly or approximately) regression analyses using summary statistics instead of using subject-specific data. So far, functions exist to support multi-SNP risk score analyses, multi-SNP conditional regression analyses, and multi-phenotype analyses, using summary statistics. There are helper functions for reading and manipulating subject-specific genotype data, which provide a platform for calculating the summary statistics, or for using R to conduct other analyses not supported by specific GWAS analysis tools.

Install the latest version of this package by entering the following in R:
AuthorToby Johnson <>
Date of publication2013-01-11 12:26:06
MaintainerToby Johnson <>
LicenseGPL (>= 2)

View on CRAN

Man pages

abf.normal: Calculate approximate Bayes factor (ABF) for normal prior.

abf.t: Calculate approximate Bayes factor (ABF) for t distribution...

abf.Wakefield: Calculate approximate Bayes factor (ABF) using method of...

agtstats: Hypertension association statistics for SNPs near the AGT...

align.snpdata.coding: Update genotype coding when there are coded allele...

allelesAB: Paste together (vectors of) A and B alleles after sorting...

bp.scores: Genetic risk scores for blood pressure.

cad.scores: Genetic risk scores for coronary artery disease risk

coeff.extract: Coefficient extractor for fitted models.

combine.moments2: Builds a matrix of second moments for a set of individuals,...

contrasting.rainbow: Rainbow of colours permuted to maximise contrast.

est.moments2: Estimate regression coefficients using quadratic...

fitmix: Fit finite mixture of univariate Gaussian densities to data.

fitmix.plot: Plot empirical density and components and total density for...

fitmix.r2: For finite mixture of univariate Gaussian densities, computes...

fitmix.simulate: Simulate from finite mixture of univariate Gaussian...

gls.approx.logistic: Calculate weights and transformed phenotype so that one...

grs.filter.Qrs: Filter SNPs for inclusion in genetic risk score using...

grs.make.scores: Make genetic risk scores from individual-level data.

grs.onesnp.apply: Convenience tool to fit a series of single-SNP models.

grs.plot: Diagnostic plot for genetic risk score calculation from...

grs.summary: Genetic risk score calculation from summary statistics.

gtx-package: Genetics ToolboX

gtx.params: Parameter format for multi-SNP analyses Read hapmap haplotypes.

hapmap.snpdata: Extract individual level snp/haplotype data from HapMap

height.scores: Genetic risk score for height.

lipid.cad.scores: Genetic risk scores for serum lipid levels and coronary...

lipid.scores: Genetic risk scores for serum lipid levels

liver.scores: Genetic risk scores for liver enzyme traits.

lm.moments2: Fit normal linear model using pre-built matrix of second...

magic.scores: Genetic risk scores for glucose/insulin traits.

make.moments2: Build matrix of second moments from subject-specific data.

mincover: Compute minimum size of cover of overlapping intervals.

moments2: Class for summary statistic matrix of second moments.

mthfrex: Simulated example finemapping genotype and phenotype data.

multimatch: Match with multiple matching possible.

multipheno.T2: Multi-phenotype test for association

ncp: Compute non-centrality parameter of chi squared distribution.

parse.snps: Parse text representation of a SNP embedded in flanking...

read.snpdata.impute: Read genotype dosages in the format output by IMPUTE.

read.snpdata.mach: Read genotype dosages in the format output by MACH

read.snpdata.minimac: Read genotype dosages in the format output by minimac

read.snpdata.plink: Read genotype dosages in the format output by PLINK.

remap.q2t: Remap coordinates from BLAT query sequence to BLAT target...

sanitise.whitespace: Remove leading and trailing spaces; convert double spaces to...

snpdata: Class for SNP genotype and phenotype data.

snphwe: Exact test of Hardy-Weinberg.

snphweCounts: Exact test of Hardy-Weinberg.

snps.BRCA1: Genotyping array annotation for SNPs near the BRCA1 gene.

stepdown.moments2: Stepwise downward model selection using summary statistic...

stepup.moments2: Stepwise upward model selection using summary statistic...

t2dex: Simulated example genotype and longitudinal phenotype data.

t2d.scores: Genetic risk scores for type 2 diabetes risk.

test.subsample: Test approximation used in genetic risk score analyses.


abf.normal Man page
abf.t Man page
abf.Wakefield Man page
agtstats Man page
align.snpdata.coding Man page
allelesAB Man page
as.snpdata Man page
bp.scores Man page
cad.scores Man page
chi2ncp Man page
coeff.extract Man page
combine.moments2 Man page
contrasting.rainbow Man page
est.moments2 Man page
fitmix Man page
fitmix.plot Man page
fitmix.r2 Man page
fitmix.simulate Man page
gls.approx.logistic Man page
grs.filter.Qrs Man page
grs.make.scores Man page
grs.onesnp.apply Man page
grs.plot Man page
grs.summary Man page
gtx Man page
gtx-package Man page
gtx.params Man page Man page
hapmap.snpdata Man page
height.scores Man page
is.moments2 Man page
is.snpdata Man page
lipid.cad.scores Man page
lipid.scores Man page
liver.scores Man page
lm.moments2 Man page
magic.scores Man page
make.moments2 Man page
mincover Man page
moments2 Man page
mthfrex Man page
mthfr.params Man page
multimatch Man page
multipheno.T2 Man page
parse.snps Man page
read.snpdata.impute Man page
read.snpdata.mach Man page
read.snpdata.minimac Man page
read.snpdata.plink Man page
remap.q2t Man page
sanitise.whitespace Man page
snpdata Man page
snphwe Man page
snphweCounts Man page
snps.BRCA1 Man page
stepdown.moments2 Man page
stepup.moments2 Man page
summary.snpdata Man page
t2dex Man page
t2d.scores Man page
test.subsample Man page


R/stepwise.R R/snphwe.R R/snpdata.R R/power.R R/multipheno.R R/multimatch.R R/moments2.R R/mincover.R R/manhatten.R R/input.R R/hapmap.R R/grs.R R/glsglm.R R/fitmix.R R/blat.R R/abf.R
man/test.subsample.Rd man/t2dex.Rd man/t2d.scores.Rd man/stepup.moments2.Rd man/stepdown.moments2.Rd man/snps.BRCA1.Rd man/snphweCounts.Rd man/snphwe.Rd man/snpdata.Rd man/sanitise.whitespace.Rd man/remap.q2t.Rd man/read.snpdata.plink.Rd man/read.snpdata.minimac.Rd man/read.snpdata.mach.Rd man/read.snpdata.impute.Rd man/parse.snps.Rd man/ncp.Rd man/multipheno.T2.Rd man/multimatch.Rd man/mthfrex.Rd man/moments2.Rd man/mincover.Rd man/make.moments2.Rd man/magic.scores.Rd man/lm.moments2.Rd man/liver.scores.Rd man/lipid.scores.Rd man/lipid.cad.scores.Rd man/height.scores.Rd man/hapmap.snpdata.Rd man/ man/gtx.params.Rd man/gtx-package.Rd man/grs.summary.Rd man/grs.plot.Rd man/grs.onesnp.apply.Rd man/grs.make.scores.Rd man/grs.filter.Qrs.Rd man/gls.approx.logistic.Rd man/fitmix.simulate.Rd man/fitmix.Rd man/fitmix.r2.Rd man/fitmix.plot.Rd man/est.moments2.Rd man/contrasting.rainbow.Rd man/combine.moments2.Rd man/coeff.extract.Rd man/cad.scores.Rd man/bp.scores.Rd man/allelesAB.Rd man/align.snpdata.coding.Rd man/agtstats.Rd man/abf.Wakefield.Rd man/abf.t.Rd man/abf.normal.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.