View source: R/buildClusterTreeFromPB.R
buildClusterTreeFromPB | R Documentation |
Perform hierarchical clustering on cell types from pseudobulk by aggregating read counts from each cell type.
buildClusterTreeFromPB(
pb,
method = c("complete", "ward.D", "single", "average", "mcquitty", "median", "centroid",
"ward.D2"),
dist.method = c("euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski"),
assays = assayNames(pb)
)
pb |
|
method |
clustering method for |
dist.method |
distance metric |
assays |
which assays to include |
hierarchical clustering object of class hclust
library(muscat)
library(SingleCellExperiment)
data(example_sce)
# create pseudobulk for each sample and cell cluster
pb <- aggregateToPseudoBulk(example_sce,
assay = "counts",
cluster_id = "cluster_id",
sample_id = "sample_id",
verbose = FALSE
)
# Hierarchical clustering of cell types
hcl <- buildClusterTreeFromPB(pb)
plot(hcl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.