aertslab / SCENIC

SCENIC is an R package to infer Gene Regulatory Networks and cell types from single-cell RNA-seq data.
http://scenic.aertslab.org
GNU General Public License v3.0
412 stars 94 forks source link

Is there a function like regulon_specificity_scores in pySCENIC? #113

Closed Sophia409 closed 2 years ago

Sophia409 commented 4 years ago

Hello aertslab, Wondering how can I compute regulon_specificity_scores to get cell type specific regulons in SCENIC? Is there a function like regulon_specificity_scores in pySCENIC? image image

gloriafight commented 3 years ago

I also want to use this function. The following is my methods. The file mac_all_auc_mtx.txt from pyscenic aucell result.

regulons activaty by cluster

auc <- read.csv("./v2/mac_all_auc_mtx.txt",row.names = 1) colnames(auc) <- gsub("\.{3}","",colnames(auc)) AUCmatrix <- t(auc) regulonActivity_byCellType <- sapply(split(cell_cluster$cellid, cell_cluster$cluster), function(cells) rowMeans(AUCmatrix[,cells]))