hap {gap}R Documentation

Haplotype reconstruction

Description

Haplotype reconstruction using sorting and trimming algorithms

Usage

hap(id,data,nloci,loci=rep(2,nloci),names=paste("loci",1:nloci,sep=""),
              mb=0,pr=0,po=0.001,to=0.001,th=1,maxit=100,n=0,
              ss=0,rs=0,rp=0,ro=0,rv=0,sd=0,mm=0,mi=0,mc=50,ds=0.1,de=0,q=0)

Arguments

id a column of subject id
data genotype table
nloci number of loci
loci number of alleles at all loci
names locus names
mb Maximum dynamic storage to be allocated, in Mb
pr Prior (ie population) probability threshold
po Posterior probability threshold
to Log-likelihood convergence tolerance
th Posterior probability threshold for output
maxit Maximum EM iteration
n Force numeric allele coding (1/2) on output (off)
ss Tab-delimited speadsheet file output (off)
rs Random starting points for each EM iteration (off)
rp Restart from random prior probabilities
ro Loci added in random order (off)
rv Loci added in reverse order (off)
sd Set seed for random number generator (use date+time)
mm Repeat final maximization multiple times
mi Create multiple imputed datasets. If set >0
mc Number of MCMC steps between samples
ds Starting value of Dirichlet prior parameter
de Finishing value of Dirichlet prior parameter
q Quiet operation (off)

Details

The package can hanlde much larger number of multiallelic loci. For large sample size with relatively small number of multiallelic loci, genecounting should be used.

Value

The returned value is a list containing:

l1 log-likelihood assuming linkage disequilibrium
converge convergence status, 0=failed, 1=succeeded
niter number of iterations

References

Clayton DG (2001) SNPHAP. http://www-gene.cimr.cam.ac.uk/clayton/software

Zhao JH and W Qian (2003) Association analysis of unrelated individuals using polymorphic genetic markers. RSS 2003, Hassalt, Belgium

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

Note

adapted from hap

See Also

genecounting

Examples

## Not run: 
# 4 SNP example, to generate hap.out and assign.out alone
data(fsnps)
hap(id=fsnps[,1],data=fsnps[,3:10],nloci=4)
dir()
file.show("hap.out")
file.show("assign.out")

# to generate results of imputations
hap(id=fsnps[,1],data=fsnps[,3:10],nloci=4,ss=1,mi=5)
dir()
## End(Not run)

[Package gap version 1.0-1 Index]