BaronPancreas_mouse

Hierarchical consensus partitioning analysis on dataset ‘BaronPancreas_mouse’

Runnable code:

library(cola)

process_counts = function(data, column = NULL) {
    mat = assays(data)$counts
    mat = as.matrix(mat)
    s = colSums(mat)
    fa = s/mean(s)
    for(i in 1:ncol(mat)) mat[, i]/fa[i]
    mat = adjust_matrix(log2(mat + 1))

    anno = NULL
    if(!is.null(column)) {
        anno = colData(data)
           anno = as.data.frame(anno)
        anno = anno[, column, drop = FALSE]
    }

    list(mat = mat, anno = anno)
}

library(scRNAseq)
data = BaronPancreasData('mouse')
lt = process_counts(data)
rh = hierarchical_partition(lt$mat, subset = 500, cores = 4, anno = lt$anno)
saveRDS(rh, file = "BaronPancreas_mouse_cola_rh.rds")

cola_report(rh, output = "BaronPancreas_mouse_cola_rh_report", title = "cola Report for Hierarchical Partitioning - 'BaronPancreas_mouse'")

The HTML report is here. (generated by cola version 2.0.0, R 4.1.0.)