getPhyloTree: getPhyloTree

Description Usage Arguments Value Examples

View source: R/getPhyloTree.R

Description

getPhyloTree is function that reports a phylogenetic tree of clusters based on admixture analysis. The phylogeny tree that construct a neighbor-joining tree based on a similar matrix between clusters. By given multiple Q matrices with varying a number of ancestors (K), the framework define a similar value between clusters i,j as a minimum number K that makes majority of members of two clusters are in the different clusters. This K reflexes a minimum number of ancestors we need to splitting cluster i,j into different clusters if we assign K clusters based on maximum admixture ratio of individuals.

Usage

1
getPhyloTree(QmatList, indexClsVec)

Arguments

QmatList

is list of Q matrix where QmatList[[k]] is a Q matrix with k+1 ancestors.

indexClsVec

is a vector of clustering assignment where indexClsVec[i] is a cluster number of individual i.

Value

This function returns an object of nj tree as well as a matrix minDiffAncestorClsMat that is used as a similarity matrix.

tree

is an object of nj tree calculated by ape::nj() function on a dissimilarity version of minDiffAncestorClsMat.

minDiffAncestorClsMat

is a minimum-ancestor-number matrix where minDiffAncestorClsMat[i,j] is a minimum number of ancestors that make i and j to be different clusters while minDiffAncestorClsMat[i,j]-1 makes majority of members from i and j belong to the same cluster.

Examples

1
2
3
4
# Running ipADMIXTURE on Q matrices (K=2-12) of 27 human population dataset.
h27pop_obj<-ipADMIXTURE(Qmat=ipADMIXTURE::human27pop_Qmat[[11]], admixRatioThs =0.15)
out<-ipADMIXTURE::getPhyloTree(ipADMIXTURE::human27pop_Qmat,h27pop_obj$indexClsVec)
plot(out$tree)

ipADMIXTURE documentation built on March 26, 2020, 7:38 p.m.