Learn R Programming

Haplin (version 7.3.2)

Analyzing Case-Parent Triad and/or Case-Control Data with SNP Haplotypes

Description

Performs genetic association analyses of case-parent triad (trio) data with multiple markers. It can also incorporate complete or incomplete control triads, for instance independent control children. Estimation is based on haplotypes, for instance SNP haplotypes, even though phase is not known from the genetic data. 'Haplin' estimates relative risk (RR + conf.int.) and p-value associated with each haplotype. It uses maximum likelihood estimation to make optimal use of data from triads with missing genotypic data, for instance if some SNPs has not been typed for some individuals. 'Haplin' also allows estimation of effects of maternal haplotypes and parent-of-origin effects, particularly appropriate in perinatal epidemiology. 'Haplin' allows special models, like X-inactivation, to be fitted on the X-chromosome. A GxE analysis allows testing interactions between environment and all estimated genetic effects. The models were originally described in "Gjessing HK and Lie RT. Case-parent triads: Estimating single- and double-dose effects of fetal and maternal disease gene haplotypes. Annals of Human Genetics (2006) 70, pp. 382-396".

Copy Link

Version

Install

install.packages('Haplin')

Monthly Downloads

466

Version

7.3.2

License

GPL (>= 2)

Maintainer

Last Published

August 20th, 2024

Functions in Haplin (7.3.2)

genDataLoad

Loading the data previously read in and saved by "genDataRead"
getMothers

Getter for all rows with mothers' data
getFathers

Getter for all rows with fathers' data
genDataPreprocess

Pre-processing of the genetic data
hapPower

Power simulation for association analyses with Haplin
genDataRead

Reading the genetic data from a file
gxe

Test for gene-environment interaction
getFullTriads

Getter for all full triads
getDyads

Getter only for all dyads (child and one parent)
getChildren

Getter for all rows with children data
hapPowerAsymp

Asymptotic power calculations for genetic association analyses with Haplin
haplinSlide

Run haplin analysis in a series of sliding windows over a sequence of markers/SNPs
haplin

Fitting log-linear models to case-parent triad and/or case-control data
hapRelEff

Relative efficiency comparing different study designs in genetic association analysis with Haplin
hapRun

Simulates genetic data and runs Haplin for each simulation
initParallelRun

Initialization of the Rmpi cluster
hapSim

Simulation of genetic data in Haplin format
lineByLine

Line-by-line modification of files
haptable

Create haplin table
haplinStrat

Fit haplin to each subset/stratum of data, determined by the argument strata
nfam

Count the number of families in the data
nindiv

Count the number of individuals in the data
pedToHaplin

Convert from ped format data to Haplin format
plot.haplinStrat

Plotter function for haplinStrat results.
plot.haplinSlide

Plotter function for haplinSlide.
nsnps

Count the number of markers in the data
output

Save files with summary, table, and plot from a haplin object.
pQQ

QQ-plot with confidence intervals for a vector of p-values
rbindFiles

Combine a sequence of files by rows
showGen

Display chosen genotypes
pJohnson

The Johnson distributions
snpPos

Find the column numbers of SNP identifiers/SNP numbers in a ped file
snpPower

Power calculations for a single SNP
showPheno

Display phenotype part of data
suest

Compute a joint p-value for a list of haplin fits (usually from a sliding window approach), correcting for multiple testing.
snpSampleSize

Sample size calculations for a single SNP
showSNPnames

Display marker names
plot.haplin

Plot a haplin object
print.haplin

Print a haplin object
print.summary.haplin

Print the summary of a haplin object
summary.haplin

Summary of a haplin object
toDataFrame

Stack dataframes from haplinSlide into a single dataframe
plot.haptable

Plot a haptable object
plotPValues

Plotting p-values for relative risks
cbindFiles

Combine a sequence of files by columns
convertPed

Convert large ped files by creating unique IDs, converting allele coding and extracting a selection of SNPs
genDataGetPart

Extracting part of genetic data.
finishParallelRun

Closing the Rmpi cluster
f.create.snp.names

Intern function for creating column names for genotype data
f.check.unique.ids

Checking uniqueness of individuals' IDs
f.convert.matrix.ff

Converting Haplin-formatted matrix into the new format
f.create.missingness.matrix

Create family matrix of data missingness
f.get.gen.data.cols

Getter for the list with genetic or environmental data
f.extract.ff.numeric

Extract a part of an ff array (matrix) and return it as numeric matrix