plot_optimal_CORE: plot one single tree with the optimal clustering result

Description Usage Arguments Value Author(s) Examples

View source: R/CORE_clustering.R

Description

after an optimal cluster has been identified, users may use this function to plot the resulting dendrogram with the branch colors represent clutering results

Usage

1
2
3
4
5
6
plot_optimal_CORE(
  original_tree,
  optimal_cluster = NULL,
  shift = -100,
  values = NULL
)

Arguments

original_tree

a dendrogram object

optimal_cluster

a vector of cluster IDs for cells in the dendrogram

shift

a numer specifying the gap between the dendrogram and the colored

values

a vector containing color values of the branches and the colored bar underneath the tree bar underneath the dendrogram. This parameter allows better selection of colors for the display.

Value

a plot with colored braches and bars for the optimal clustering result

Author(s)

Quan Nguyen, 2017-11-25

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
day5 <- day_5_cardio_cell_sample
mixedpop2 <-new_summarized_scGPS_object(ExpressionMatrix = day5$dat5_counts, 
    GeneMetadata = day5$dat5geneInfo, CellMetadata = day5$dat5_clusters)
CORE_cluster <- CORE_clustering(mixedpop2, remove_outlier = c(0))
key_height <- CORE_cluster$optimalClust$KeyStats$Height
optimal_res <- CORE_cluster$optimalClust$OptimalRes
optimal_index = which(key_height == optimal_res)
plot_optimal_CORE(original_tree= CORE_cluster$tree, 
    optimal_cluster = unlist(CORE_cluster$Cluster[optimal_index]),
    shift = -2000)

IMB-Computational-Genomics-Lab/scGPS documentation built on Dec. 6, 2020, 3:20 p.m.