# biclustFunc: biclustFunc function In ipADMIXTURE: Iterative Pruning Population Admixture Inference Framework

## Description

biclustFunc is a binary clustering function using hierarchical clustering.

## Usage

 `1` ```biclustFunc(Qmat, admixRatioThs = 0.5, method = "average") ```

## Arguments

 `Qmat` is a Q matrix that contains admixture ratios of all individuals where the `Qmat[i,j]` represents the admixture ratio of ancestor j for individual i. `admixRatioThs` is a threshold to determine that if a cluster has `maxDiffAdmixRatio` lower than threshold, then the cluster is a homogeneous cluster. `method` is a method parameter of `hclust` object for hierarchical clustering analysis. The default is "average".

## Value

This function returns binary clustering results.

 `heteroFlag` is a flag that represents a status whether a given cluster is heterogeneous (having sub-clusters). It is TRUE if `maxDiffAdmixRatio >= admixRatioThs`. `clusterInx` is a vector of clustering assignment where `indexClsVec[i]` is a cluster number of individual i. `meanDiffAdmixRatio` is a vector of magnitude-difference of admixture ratios. It is calculated by splitting a given cluster into two sub-clusters. Then, we take the absolute on the difference between mean admixture ratios of sub-clusters. `Qmat1` is a Q matrix of sub-cluster #1 after splitting a given cluster into two sub-clusters that contains admixture ratios of all individuals where the `Qmat[i,j]` represents the admixture ratio of ancestor j for individual i. `Qmat2` is a Q matrix of sub-cluster #2 after splitting a given cluster into two sub-clusters that contains admixture ratios of all individuals where the `Qmat[i,j]` represents the admixture ratio of ancestor j for individual i. `maxDiffAdmixRatio` is a maximum of magnitude-difference of admixture ratios for a given cluster before splitting into two sub-clusters.

## Examples

 ```1 2``` ```# Running biclustFunc on Q matrix of 27 human population dataset where K = 12 obj<-biclustFunc(Qmat=ipADMIXTURE::human27pop_Qmat[[11]], admixRatioThs =0.15) ```

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