runHOPACH: Create HOPACH tree

Description Usage Arguments Value Author(s) References Examples

View source: R/runHOPACH.R

Description

A function generating HOPACH tree using the average expression matrix for each cell type.

Usage

1
runHOPACH(data, plot = TRUE, kmax = 5)

Arguments

data

A matrix of average expression matrix (each row indicates the gene, each column indicates the cell type)

plot

Indicate whether plot or not

kmax

Integer between 1 and 9 specifying the maximum number of children at each node in the tree.

Value

Return a list where

Author(s)

Yingxin Lin

References

van der Laan, M. J. and Pollard, K. S. (2003) ‘A new algorithm for hybrid hierarchical clustering with visualization and the bootstrap’, Journal of Statistical Planning and Inference. doi: 10.1016/S0378-3758(02)00388-9.

Examples

1
2
3
4
5
6
7
8
data("scClassify_example")
wang_cellTypes <- factor(scClassify_example$wang_cellTypes)
exprsMat_wang_subset <- scClassify_example$exprsMat_wang_subset
avgMat_wang <- apply(exprsMat_wang_subset, 1, function(x)
aggregate(x, list(wang_cellTypes), mean)$x)
rownames(avgMat_wang) <- levels(wang_cellTypes)
res_hopach <- runHOPACH(avgMat_wang)
res_hopach$plot

scClassify documentation built on Nov. 8, 2020, 8:08 p.m.