R/Clustering.R

Defines functions clusterCells

Documented in clusterCells

#'Clusters the data and splits the dendrogram into k clusters
#'@param sco An scell S4 object
#'@param k The number of clusters we wish to retrieve
#'@export clusterCells
clusterCells <- function(sco,k){
  
  hc <- hclust(as.dist(1-cor((sco@data))))
  sco@cell.clusters <- cutree(hc,k)
  sco
}
shambam/MyFirstPackage documentation built on May 30, 2019, 2:06 a.m.