#' Run Phenograph on varbin data
#'
#' @param umap_df
#'
#' @return
#' @export
#'
#' @examples
varbin_pheno <- function(umap_df) {
pheno <- Rphenograph::Rphenograph(umap_df, k = 30)
cl <- tibble(cell = rownames(umap_df),
cluster = membership(pheno[[2]])) %>%
arrange(cluster)
# reordering
umap_df <- umap_df[cl$cell,]
# ordering cells
seg_df_cells_t <- seg_df_cells_t[cl$cell,]
# setting colors
n_colors <- cl$cluster %>% unique() %>% length()
row_col <- setNames(colorRampPalette(paletteer::paletteer_d(pals,
alphabet, 26))(n_colors),
levels(as.factor(cl$cluster)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.