Runnable code:
library(cola)
library(scRNAseq)
data = XinPancreasData()
mat = as.matrix(assays(data)$rpkm)
mat = log2(mat + 1)
mat = adjust_matrix(mat)
anno = colData(data)[, c("age", "cell.type")]
anno = as.data.frame(anno)
rh = hierarchical_partition(mat, subset = 500, cores = 4, anno = anno)
saveRDS(rh, file = "XinPancreas_cola_rh.rds")
cola_report(rh, output = "XinPancreas_cola_rh_report", title = "cola Report for Hierarchical Partitioning - 'XinPancreas'")
The HTML report is here. (generated by cola version 2.0.0, R 4.1.0.)