## Cluster plot again plot(clusterResult$pheatmap$gtable)
## The detailed table ktables <- goTables$ktables ngroups <- sapply(ktables, nrow) ktables <- do.call(rbind, ktables) stopifnot(identical(names(clusterResult$GO), c("BP", "MF", "CC"))) ## The order matters p <- kable(ktables, escape=FALSE, row.names=FALSE, format = "html", digits=4, caption="GO categories of feature clusters") %>% kable_styling(bootstrap_options = "striped", full_width = F, position = "float_right") %>% footnote(general="Cluster font color corresponds to the row colors in the heatmap plot.") %>% add_header_above(c("Biological Proc. (BP)" = 4, "Molecular Func. (MF)" = 4, "Cellular Comp. (CC)" = 4)) stopifnot(length(bgColors) == length(ngroups)) ## The colour and clusters should match. indices <- c(0,cumsum(ngroups)) for(i in 1:length(ngroups)){ p <- p %>% kableExtra::group_rows(paste("Cluster", i), indices[i]+1, indices[i+1], label_row_css = paste("background-color:", bgColors[i], "; color: #fff;")) } p
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.