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
422 stars 94 forks source link

RSS Plot not selecting the dseired data (out of bounds error) #194

Closed AAA-3 closed 3 years ago

AAA-3 commented 3 years ago

Trying to run the following code

#Cell-type specific regulators (based on the Regulon Specificity Score (RSS) 
regulonAUC <- loadInt(scenicOptions, "aucell_regulonAUC")
rss <- calcRSS(AUC=getAUC(regulonAUC), cellAnnotation=cellInfo[colnames(regulonAUC), "genotype"])
rssPlot <- plotRSS(rss)
plotly::ggplotly(rssPlot$plot)

and keep getting this error

> rssPlot <- plotRSS(rss) # seems to be plotting by sample isntead of genotype
Showing regulons and cell types with any RSS > 0.01 (dim: 0x0)
Error in tmp[, i] : subscript out of bounds

The graph is still produced but it is not by "genotype" like I specified, but seems to rather be by "sample" - see below: image

image

Any idea how to plot the graph using genotype instead of sample?

siqi-zZ commented 3 years ago

Hi, I had a similar question, I had 6 group at regulonAUC, but the plotrss only shows 4. After check the plotrss table I found others 2 group had 0 TF table(rssPlot$df$cellType) image

. Is that mean plotRss choose some significance TF? Or can I increase the display of these TFs by changing the threshold adjustment?

rss <- calcRSS(AUC=getAUC(regulonAUC), cellAnnotation=cellInfo[colnames(regulonAUC), "Class"]) rssPlot <- plotRSS(rss) plotly::ggplotly(rssPlot$plot) image

yoeHuuui commented 2 years ago

I guess, it may be caused by the parameter zThreshold in plotRSS function. You can try to decrease the value of it.