inst/shinyApp/app/MethodsFolder/hclust.R

fct.parameters <- list("k"=c(1,10,100,10))
fct.parameters.description <- list("Number of clusters. Effectively: cut the tree at the height corresponding to the chosen number of clusters if possible.")


BRP_BM.hclust.execute <- function(fcs.file, params = list(10,40000), markers_col)
{
    nmb.events <- min(as.numeric(params[[2]]),nrow(fcs.file@exprs))
    k <- min(nrow(fcs.file@exprs), 40000)
    fcs.labels <- cutree(hclust(dist(fcs.file@exprs[,as.numeric(markers_col)])),k)
    
    fcs.labels <- matrix(fcs.labels, ncol=1)
    colnames(fcs.labels) <- paste0("cluster_hclust.",ncol(fcs.file@exprs)+1)
    
    return(fcs.labels)
}
IsamBenS/ClusteringTool documentation built on May 13, 2019, 1:15 p.m.