Learn R Programming

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

gtx (version 0.0.3)

Genetics ToolboX

Description

Assorted tools for genetic association analyses. The 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, and multi-SNP conditional regression 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.

Copy Link

Version

Install

install.packages('gtx')

Monthly Downloads

8

Version

0.0.3

License

GPL (>= 2)

Maintainer

Toby Johnson

Last Published

November 17th, 2011

Functions in gtx (0.0.3)

grs.summary

Genetic risk score calculation from summary statistics.
grs.plot

Diagnostic plot for genetic risk score calculation from summary statistics.
lm.moments2

Fit normal linear model using pre-built matrix of second moments.
bp.scores

Genetic risk scores for blood pressure.
t2dex

Simulated example genotype and longitudinal phenotype data.
hapmap.read.haplotypes

Read hapmap haplotypes.
magic.scores

Genetic risk scores for glucose/insulin traits.
gtx.params

Parameter format for multi-SNP analyses
grs.onesnp.apply

Convenience tool to fit a series of single-SNP models.
mthfrex

Simulated example finemapping genotype and phenotype data.
est.moments2

Estimate regression coefficients using quadratic approximation to likelihood function.
read.snpdata.mach

Read genotype dosages in the format output by MACH
coeff.extract

Coefficient extractor for fitted models.
t2d.scores

Genetic risk scores for type 2 diabetes risk.
gtx

Genetics ToolboX
read.snpdata.impute

Read genotype dosages in the format output by IMPUTE.
allelesAB

Paste together (vectors of) A and B alleles after sorting alphabetically.
hapmap.snpdata

Extract individual level snp/haplotype data from HapMap
test.subsample

Test approximation used in genetic risk score analyses.
make.moments2

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

Stepwise upward model selection using summary statistic matrix.
gls.approx.logistic

Calculate weights and transformed phenotype so that one iteration of generalised least squares approximates a logistic regression.
snpdata

Class for SNP genotype and phenotype data.
grs.make.scores

Make genetic risk scores from individual-level data.
align.snpdata.coding

Update genotype coding when there are coded allele designation flips.
combine.moments2

Builds a matrix of second moments for a set of individuals, from the matrices of second moments for all constituent subsets of individuals.
stepdown.moments2

Stepwise downward model selection using summary statistic matrix.
height.scores

Genetic risk score for height.
read.snpdata.plink

Read genotype dosages in the format output by PLINK.
grs.filter.Qrs

Filter SNPs for inclusion in genetic risk score using heterogeneity test.
lipid.scores

Genetic risk scores for serum lipid levels
cad.scores

Genetic risk scores for coronary artery disease risk