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

Error at runSCENIC_3_scoreCells step #359

Open maxc2020 opened 1 year ago

maxc2020 commented 1 year ago

I've tried using data from two large seurat objects with SCENIC and am getting a similar error with each at the runSCENIC_3_scoreCells step. Decreasing nCores to 1 has not addressed it. I am running on a remote cluster via SGE and have updated all packages.

exprMat_filtered and scenicOptions generated from Seurat object per vignettes

code is along the lines of:

library("SCENIC")
library("future")
library("parallelly")
ncores <- parallelly::availableCores()
plan("multisession", workers = 1)

set.seed(43)

exprMat_filtered <- readRDS(file="exprMat_filtered.Rds")
scenicOptions <- readRDS(file="scenicOptions.Rds")
scenicOptions@settings$nCores <- 1

# Calculate correlation
runCorrelation(exprMat_filtered, scenicOptions)

# Run GENIE3
genesSplit <- split(sort(rownames(exprMat_filtered)), 1:10)
length(genesSplit)

#runGenie3(exprMat_filtered, scenicOptions, resumePreviousRun = TRUE)
weightMatrix <- GENIE3(exprMat_filtered, regulators=inputTFs, targets=genesSplit[[2]])
save(weightMatrix, file="GENIE3_weightMatrix_2.RData"))

# Build and score the GRN
scenicOptions <- runSCENIC_1_coexNetwork2modules(scenicOptions)
scenicOptions <- runSCENIC_2_createRegulons(scenicOptions)
scenicOptions <- runSCENIC_3_scoreCells(scenicOptions, exprMat_filtered)

Output generated include: Step2_MotifEnrichment.tsv Step2_regulonTargetsInfo.tsv Step2_MotifEnrichment_preview.html Step2_MotifEnrichment_preview_files

With one object, the output is: Finished running AUCell. Plotting heatmap... Error in as.vector(x, mode = "character") : no method for coercing this S4 class to a vector Calls: runSCENIC_3_scoreCells ... as.character -> as.character -> .local -> as.vector In addition: Warning messages: 1: In max(densCurve$y[nextMaxs]) : no non-missing arguments to max; returning -Inf 2: In max(densCurve$y[nextMaxs]) : no non-missing arguments to max; returning -Inf 3: In max(densCurve$y[nextMaxs]) : no non-missing arguments to max; returning -Inf 4: In max(densCurve$y[nextMaxs]) : no non-missing arguments to max; returning -Inf Execution halted

With the other object, the output is: Finished running AUCell. Plotting heatmap... Error in as.vector(x, mode = "character") : no method for coercing this S4 class to a vector Calls: runSCENIC_3_scoreCells ... as.character -> as.character -> .local -> as.vector Execution halted

Anyone have an idea what is going on here? Appreciate any tips. I have tried troubleshooting without making progress.

maxc2020 commented 1 year ago

Following up. I have tried this on more than one system, reinstalling all packages, on different scenicOptions objects, etc, but continue to have same issue at runSCENIC_3_scoreCells step.

Has anyone else had this issue? Can anyone help?