aertslab / SCENICprotocol

A scalable SCENIC workflow for single-cell gene regulatory network analysis
GNU General Public License v3.0
143 stars 62 forks source link

The rss results are different between R and python #72

Open ZivTQ opened 1 year ago

ZivTQ commented 1 year ago

Hi Tanks for your packages for TF analysis. I have a problem here: I did SCENIC analysis using pySCENIC, and finally I got the a loom file after pyscenic auc analysis. I read the loom file in R and python to calculate rss, respectively. However, I got different results.

R: code sce_SCENIC <- open_loom("sample_SCENIC.loom") regulonAUC <- get_regulons_AUC(sce_SCENIC, column.attr.name='RegulonsAUC') rss <- calcRSS(AUC=getAUC(regulonAUC), cellAnnotation=cellTypes[colnames(regulonAUC), selectedResolution])

image

Python: code: lf = lp.connect( f_pyscenic_output, mode='r+', validate=False ) auc_mtx = pd.DataFrame( lf.ca.RegulonsAUC, index=lf.ca.CellID) lf.close() rss_cellType = regulon_specificity_scores( auc_mtx, sce_test.obs.celltype ) rss_cellType image

The value in auc_mtx was same in R and python!

thanks so much

faizjab commented 1 year ago

how did you get the loom file? I ran pySCENIC in docker and got the three output files: expr_mat.tsv regulons.csv auuc_mtx.csv

Do you know what to do after this step?