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.

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


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