Learn R Programming

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

gtx (version 0.0.7)

Genetics ToolboX

Description

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.

Copy Link

Version

Install

install.packages('gtx')

Monthly Downloads

8

Version

0.0.7

License

GPL (>= 2)

Maintainer

Toby Johnson

Last Published

September 19th, 2012

Functions in gtx (0.0.7)

lipid.scores

Genetic risk scores for serum lipid levels
gtx.params

Parameter format for multi-SNP analyses
abf.normal

Calculate approximate Bayes factor (ABF) for normal prior.
height.scores

Genetic risk score for height.
magic.scores

Genetic risk scores for glucose/insulin traits.
snpdata

Class for SNP genotype and phenotype data.
multipheno.T2

Multi-phenotype test for association
grs.filter.Qrs

Filter SNPs for inclusion in genetic risk score using heterogeneity test.
lm.moments2

Fit normal linear model using pre-built matrix of second moments.
fitmix.simulate

Simulate from finite mixture of univariate Gaussian densities.
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.
fitmix.r2

For finite mixture of univariate Gaussian densities, computes proportion of variance explained by the mixture labels.
fitmix.plot

Plot empirical density and components and total density for finite mixture of univariate Gaussian densities.
hapmap.snpdata

Extract individual level snp/haplotype data from HapMap
gls.approx.logistic

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

Class for summary statistic matrix of second moments.
gtx-package

Genetics ToolboX
mthfrex

Simulated example finemapping genotype and phenotype data.
stepdown.moments2

Stepwise downward model selection using summary statistic matrix.
grs.onesnp.apply

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

Exact test of Hardy--Weinberg.
align.snpdata.coding

Update genotype coding when there are coded allele designation flips.
coeff.extract

Coefficient extractor for fitted models.
read.snpdata.mach

Read genotype dosages in the format output by MACH
remap.q2t

Remap coordinates from BLAT query sequence to BLAT target sequence.
multimatch

Match with multiple matching possible.
grs.summary

Genetic risk score calculation from summary statistics.
hapmap.read.haplotypes

Read hapmap haplotypes.
make.moments2

Build matrix of second moments from subject-specific data.
parse.snps

Parse text representation of a SNP embedded in flanking sequences.
agtstats

Hypertension association statistics for SNPs near the AGT gene.
est.moments2

Estimate regression coefficients using quadratic approximation to likelihood function.
grs.make.scores

Make genetic risk scores from individual-level data.
bp.scores

Genetic risk scores for blood pressure.
snps.BRCA1

Genotyping array annotation for SNPs near the BRCA1 gene.
abf.Wakefield

Calculate approximate Bayes factor (ABF) using method of Wakefield (2009).
fitmix

Fit finite mixture of univariate Gaussian densities to data.
test.subsample

Test approximation used in genetic risk score analyses.
read.snpdata.plink

Read genotype dosages in the format output by PLINK.
abf.t

Calculate approximate Bayes factor (ABF) for t distribution prior.
cad.scores

Genetic risk scores for coronary artery disease risk
t2dex

Simulated example genotype and longitudinal phenotype data.
allelesAB

Paste together (vectors of) A and B alleles after sorting alphabetically.
grs.plot

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

Stepwise upward model selection using summary statistic matrix.
t2d.scores

Genetic risk scores for type 2 diabetes risk.
read.snpdata.impute

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

Read genotype dosages in the format output by minimac
sanitise.whitespace

Remove leading and trailing spaces; convert double spaces to single spaces.
snphweCounts

Exact test of Hardy--Weinberg.