choose_cluster_scExp {ChromSCape} | R Documentation |
This functions takes as input a SingleCellExperiment object with consclust and a number of cluster to select. It outputs a SingleCellExperiment object with each cell assigned to a correlation cluster in colData. Also calculates a hierarchical clustering of the consensus associations calculated by ConsensusClusterPlus.
choose_cluster_scExp( scExp, nclust = 3, consensus = FALSE, hc_linkage = "ward.D" )
scExp |
A SingleCellExperiment object containing consclust in metadata. |
nclust |
Number of cluster to pick (3) |
consensus |
Use consensus clustering results instead of simple hierarchical clustering ? (FALSE) |
hc_linkage |
A linkage method for hierarchical clustering. See cor. ('ward.D') |
Returns a SingleCellExperiment object with each cell assigned to a correlation cluster in colData.
data("scExp") scExp_cf = correlation_and_hierarchical_clust_scExp(scExp) scExp_cf = choose_cluster_scExp(scExp_cf,nclust=3,consensus=FALSE) table(scExp_cf$cell_cluster) scExp_cf = consensus_clustering_scExp(scExp) scExp_cf_consensus = choose_cluster_scExp(scExp_cf,nclust=3,consensus=TRUE) table(scExp_cf_consensus$cell_cluster)