getPhyloTree {ipADMIXTURE} | R Documentation |
getPhyloTree
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
getPhyloTree(QmatList, indexClsVec)
Arguments
QmatList |
is list of Q matrix where |
indexClsVec |
is a vector of clustering assignment where |
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 |
is a minimum-ancestor-number matrix where |
Examples
# 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)