Learn R Programming

phyclust (version 0.1-9)

haplo.post.prob: Tzeng's method: haplotype grouping for SNP sequences

Description

For SNP sequences only, Tzeng's method (2005) uses an evolution approach to group haplotypes based on a deterministic transformation of haplotype frequency. This is a modified version of original function, haplo.score.RD.unphased.fun.

Usage

haplo.post.prob(X, ploidy = 2, skip.haplo = 1e-07, K = NULL)

Arguments

X
sid matrix with $N$ rows/sequences and $L$ columns/sites.
ploidy
ploidy, no effect for phase known, keep consistence only.
skip.haplo
lower bound of haplotypes frequencies.
K
number of clusters.

Value

  • See the original paper and source codes' documents for details. The function returns a list contains:
  • 'haplo'summarized data set in a list contains: ll{ 'haplotype' unique haplotypes, dim = $N_{unique} \times L$. 'hap.prob' frequency of haplotypes. 'post' posterior probabilities of phase unknown haplotypes. 'hap1code' unique ids of 'haplotype'. 'hap2code' unique ids of 'haplotype', no effect if ploidy = 2. 'indx.subj' id of subjects. }
  • 'FD.id'unique ids of 'haplotype' for full dimension analysis.
  • 'RD.id'unique ids of 'haplotype' for reduced dimension analysis.
  • 'FD.post'posterior probabilities for full dimension analysis.
  • 'RD.post'posterior probabilities for reduced dimension analysis.
  • 'g.truncate'number of clusters

ToDo(s)

  • test codes for phased unknown cases.

Details

X should be a phase known haplotype data. For phase unknown and Tzeng's method (2006) are not tested yet.

If K is NULL, the result of getcut.fun will be used.

References

Phylogenetic Clustering Website: http://thirteen-01.stat.iastate.edu/snoweye/phyclust/

Tzeng, J.Y. (2005) Evolutionary-Based Grouping of Haplotypes in Association Analysis, Genetics Epidemiology, 28, 220-231. http://www4.stat.ncsu.edu/~jytzeng/software.php

See Also

getcut.fun.

Examples

Run this code
data.path <- paste(.libPaths()[1], "/phyclust/data/crohn.phy", sep = "")
my.snp <- read.phylip(data.path, code.type = "SNP")
ret <- haplo.post.prob(my.snp$org, ploidy = 1)
str(ret)

Run the code above in your browser using DataLab