R: Tzeng's Method: Haplotype Grouping for SNP Sequences

haplo.post.prob {phyclust} | R Documentation

## 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.

### 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.

### 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:
'haplotype' | unique haplotypes, dim = N.X.unique * 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.

### Author(s)

Jung-Ying Tzeng.

Maintain: Wei-Chen Chen wccsnow@gmail.com

### References

Phylogenetic Clustering Website: https://snoweye.github.io/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

    ## Not run:
    library(phyclust, quiet = TRUE)

    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)

    ## End(Not run)

[Package phyclust version 0.1-30 Index]