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
421 stars 95 forks source link

Error in runSCENIC_3_scoreCells #400

Open AritaZ-hang opened 1 year ago

AritaZ-hang commented 1 year ago

Hi, when I used my own data to run the code, I came across an error like this:

Warning in .AUCell_calcAUC(geneSets = geneSets, rankings = rankings, nCores = nCores, : 
 Using only the first 123 genes (aucMaxRank) to calculate the AUC.
Error in if (any (FCs > 1.5)) waning (gSetName, ":\tCheck the AUC histogram. ", : 
missing value where TRUE/FALSE needed

I've never met this problem before, and I cannot seem to fix it. Does anyone know what it could mean?

shengh99 commented 1 year ago

Hi, I had the same problem.Have you solved that?

ChrisTzaferis commented 10 months ago

Hi, I faced the same error in the analysis of my dataset. I tried different seeds, different versions of AUC package, but nothing worked. I don't know if there is any connection with the results from the previous step GENIE3/Arboreto. When my input in Arboreto is the raw counts the error doesn't come up, however when I use the log2(counts+1) as in the tutorial, I get "Error in if (any (FCs > 1.5)) waning (gSetName, ":\tCheck the AUC histogram. ", : missing value where TRUE/FALSE needed". Is there any suggestion about this error?

ChrisTzaferis commented 10 months ago

Hi again, I think I have figured out where the problem is in my case. By plotting the different AUC histograms (I used nCores=1 to do that) I noticed that the execution halted in _Tcf21extended(53g). Next I executed manually the commands in the function _.auc_assignmnetThresholdv6 from the package AUCell. In the following part of the code is where the error is thrown `aucThr <- aucThrs if(skipGlobal) aucThr <- aucThrs[which(!names(aucThrs) %in% "Global_k1")]

TO DO: Decide when to merge with GLOBAL

if(skipRed) aucThr <- aucThrs[which(!names(aucThrs) %in% "L_k2")]

TO DO: Decide when to merge with GLOBAL

aucThr <- aucThr[which.max(aucThr)] # to keep name`

when I omit the first if condition the execution is completed successfully. More particularly the aucThrs vector contains the values Global_k1 L_k2 R_k3 minimumDens 0.22559981 0.06898566 0.17267178 0.19401836 so when the if is executed the value 0.22559981 is removed and the following commands insert an NA value in the FCs variable that's why the if(any(FCs > 1.5)) part is failing afterwards.

I hope this could help.