Learn R Programming

HapEstXXR (version 0.1-8)

itegeppXXR: Haplotype estimation routine for single individual data

Description

itegeppXXR is haplotype estimation routine for samples of independent individual genotypes (EM-algorithm).

Usage

itegeppXXR(geno, des = 0, lim = 0.05)

Arguments

geno
(n,m)-Matrix; n=No of Individuals, m=No of SNPs; R-Code: 1-column genotype matrix - code 1 = 1/1, 3 = 1/2, 2 = 2/2
des
des=1 haplotype pairs, des=0 single haplotypes
lim
Threshold for combining rare haplotypes

Value

hap.id
Id. of haplotypes
hap
estimated haplotypes
freq
haplotype frequencies
hapres
individual haplotypes
likres
Likelihood value
desres
Design matrix for the model (des=1 => Haplotype pairs, des=0 => single haplotypes)

Details

Inferring haplotypes by EM-Algorithm

References

Excoffier L, Slatkin M (1995) Maximum-likelihood estimation of molecular haplotype frequencies in a diploid population. Mol Biol Evol 12:921-927

Examples

Run this code
  set.seed(123456)
  ns <- 4  # Number of SNPs
  N <- 2000   # Number of individuals
  patid <- N:1
  geno <- matrix(sample(c(1, 2, 3), ns * N, replace = TRUE), ncol = ns)
  iteHAP <- itegeppXXR(geno, des = 1, lim = 0.01)

Run the code above in your browser using DataLab