Learn R Programming

gap (version 1.1-1)

genecounting: Gene counting for haplotype analysis

Description

Gene counting for haplotype analysis with missing data

Usage

genecounting(data,weight=NULL,loci=NULL,control=gc.control())

Arguments

data
genotype table
weight
a column of frequency weights
loci
an array containing number of alleles at each locus
control
is a function with the following arguments:
  1. xdata. a flag indicating if the data involves X chromosome, if so, the first column of data indicates sex of each subject: 1=male, 2=female. The marker data are no different from the autosomal ve

Value

  • The returned value is a list containing:
  • hhaplotype frequency estimates under linkage disequilibrium (LD)
  • h0haplotype frequency estimates under linkage equilibrium (no LD)
  • probgenotype probability estimates
  • l0log-likelihood under linkage equilibrium
  • l1log-likelihood under linkage disequilibrium
  • hapidunique haplotype identifier (defunct, see gc.em)
  • npusrnumber of parameters according user-given alleles
  • npdatnumber of parameters according to observed
  • htrtabledesign matrix for haplotype trend regression (defunct, see gc.em)
  • iternumber of iterations used in gene counting
  • convergea flag indicating convergence status of gene counting
  • di0haplotype diversity under no LD, defined as $1-\sum (h_0^2)$
  • di1haplotype diversity under LD, defined as $1-\sum (h^2))$
  • residresiduals in terms of frequency weights = o - e

References

Zhao, J. H., Lissarrague, S., Essioux, L. and P. C. Sham (2002). GENECOUNTING: haplotype analysis with missing genotypes. Bioinformatics 18(12):1694-1695

Zhao, J. H. and P. C. Sham (2003). Generic number systems and haplotype analysis. Comp Meth Prog Biomed 70: 1-9

Zhao, J. H. (2004). 2LD, GENECOUNTING and HAP: Computer programs for linkage disequilibrium analysis. Bioinformatics, 20, 1325-1326

See Also

gc.em, LDkl

Examples

Run this code
# HLA data
data(hla)
hla.gc <- genecounting(hla[,3:8])
summary(hla.gc)
hla.gc$l0
hla.gc$l1

# ALDH2 data
data(aldh2)
control <- gc.control(handle.miss=1,assignment="ALDH2.out")
aldh2.gc <- genecounting(aldh2[,3:6],control=control)
summary(aldh2.gc)
aldh2.gc$l0
aldh2.gc$l1

# Chromosome X data
# assuming allelic data have been extracted in columns 3-13
# and column 3 is sex
filespec <- system.file("tests/genecounting/mao.dat")
mao2 <- read.table(filespec)
dat <- mao2[,3:13]
loci <- c(12,9,6,5,3)
contr <- gc.control(xdata=TRUE,handle.miss=1)
mao.gc <- genecounting(dat,loci=loci,control=contr)
mao.gc$npusr
mao.gc$npdat

Run the code above in your browser using DataLab