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 message during running runSCENIC_3_scoreCells() #439

Open jiuquzjw opened 5 months ago

jiuquzjw commented 5 months ago

Catched error in AUCell_buildRankings() or in the histogram plot:

jiuquzjw commented 5 months ago

Hello, thanks for this great tool!

When I run 'runSCENIC_3_scoreCells()' with SCENIC version 1.3.1, I got the following error:

Catched error in AUCell_buildRankings() or in the histogram plot: useNames = NA is defunct. Instead, specify either useNames = TRUE or useNames = FALSE. Error in saveRDS(aucellRankings, file = getIntName(scenicOptions, "aucell_rankings")) : object 'aucellRankings' not found

What should I do

MDMotlagh commented 5 months ago

@jiuquzjw Hi, This is a problem with Bioconductor 3.18 and AUCell package. Downgrade Bioconductor to 3.17 and then install AUCell and other packages including SCENIC. This should solve the problem.

jiuquzjw commented 5 months ago

@jiuquzjw Hi, This is a problem with Bioconductor 3.18 and AUCell package. Downgrade Bioconductor to 3.17 and then install AUCell and other packages including SCENIC. This should solve the problem.

Thank you. It really helps.

PKatarina commented 4 months ago

Just an FYI. I am trying to run AUCell_run with the example from the documentation and I get the same error. But I am using R 4.2.1 and Bioconductor 3.16.

I am going to try even older versions of Bioconductor to find if there is some combinaton that works with older versions of R. Any other suggestions are most welcome.

library(AUCell)

# Print session info
print(sessionInfo())

# Fake run of AUCell
set.seed(123)
exprMatrix <- matrix(
data=sample(c(rep(0, 5000), sample(1:3, 5000, replace=TRUE))),
nrow=20,
dimnames=list(paste("Gene", 1:20, sep=""),  
paste("Cell", 1:500, sep="")))
geneSets <- list(geneSet1=sample(rownames(exprMatrix), 10),
geneSet2=sample(rownames(exprMatrix), 5))
cells_rankings <- AUCell_buildRankings(exprMatrix, plotStats = FALSE)
cells_AUC <- AUCell_calcAUC(geneSets, cells_rankings, aucMaxRank=5, nCores=1)
selectedThresholds <- rowMeans(getAUC(cells_AUC))
cellsTsne<- Rtsne::Rtsne(t(exprMatrix),max_iter = 10)$Y
# cellsTsne<- tsne::tsne(t(exprMatrix),max_iter = 10)
rownames(cellsTsne) <- colnames(exprMatrix)
######
par(mfrow=c(2,3))
thrs <- AUCell_plotTSNE(tSNE=cellsTsne, exprMat=NULL,
cellsAUC=cells_AUC, thresholds=selectedThresholds,
plots = c("histogram", "binaryAUC", "AUC"))
#####
# Color based on the known phenodata:
cellInfo <- data.frame(cellType1=sample(LETTERS[1:3],ncol(exprMatrix), replace=TRUE),
cellType2=sample(letters[5:7],ncol(exprMatrix), replace=TRUE),
nGenes=abs(rnorm(ncol(exprMatrix))),
row.names=colnames(exprMatrix))
colVars <- list(cellType2=setNames(c("skyblue","magenta", "darkorange"),letters[5:7]))
# dev.off()
plotTsne_cellProps(cellsTsne, cellInfo, colVars=colVars)

version 4.2.1 (2022-06-23) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS: /apps/spack/opt/spack/linux-centos7-cascadelake/gcc-11.2.0/r-4.2.1-zh3inedhayocwcuck33iojfmatdhhye3/rlib/R/lib/libRblas.so LAPACK: /apps/spack/opt/spack/linux-centos7-cascadelake/gcc-11.2.0/r-4.2.1-zh3inedhayocwcuck33iojfmatdhhye3/rlib/R/lib/libRlapack.so

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=hr_HR.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=hr_HR.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=hr_HR.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=hr_HR.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] AUCell_1.20.2

loaded via a namespace (and not attached): [1] SummarizedExperiment_1.28.0 KEGGREST_1.38.0
[3] lattice_0.22-5 vctrs_0.6.5
[5] htmltools_0.5.7 stats4_4.2.1
[7] blob_1.2.4 XML_3.99-0.16.1
[9] rlang_1.1.3 R.oo_1.26.0
[11] later_1.3.2 DBI_1.2.1
[13] R.utils_2.12.3 BiocGenerics_0.44.0
[15] bit64_4.0.5 matrixStats_1.2.0
[17] GenomeInfoDbData_1.2.9 lifecycle_1.0.4
[19] zlibbioc_1.44.0 MatrixGenerics_1.10.0
[21] Biostrings_2.66.0 R.methodsS3_1.8.2
[23] memoise_2.0.1 Biobase_2.58.0
[25] IRanges_2.32.0 fastmap_1.1.1
[27] httpuv_1.6.14 GenomeInfoDb_1.34.9
[29] AnnotationDbi_1.60.2 GSEABase_1.60.0
[31] Rcpp_1.0.12 xtable_1.8-4
[33] promises_1.2.1 cachem_1.0.8
[35] DelayedArray_0.24.0 S4Vectors_0.36.2
[37] graph_1.76.0 annotate_1.76.0
[39] XVector_0.38.0 mime_0.12
[41] bit_4.0.5 png_0.1-8
[43] digest_0.6.34 shiny_1.8.0
[45] GenomicRanges_1.50.2 grid_4.2.1
[47] cli_3.6.2 tools_4.2.1
[49] bitops_1.0-7 magrittr_2.0.3
[51] RCurl_1.98-1.14 RSQLite_2.3.5
[53] crayon_1.5.2 ellipsis_0.3.2
[55] Matrix_1.6-5 data.table_1.15.0
[57] DelayedMatrixStats_1.20.0 sparseMatrixStats_1.10.0
[59] httr_1.4.7 R6_2.5.1
[61] compiler_4.2.1
Error: useNames = NA is defunct. Instead, specify either useNames = TRUE or useNames = FALSE. Execution halted

zhangbaobao123-abc commented 1 week ago

Hello, thanks for this great tool!

When I run 'runSCENIC_3_scoreCells()' with SCENIC version 1.3.1, I got the following error:

Catched error in AUCell_buildRankings() or in the histogram plot: useNames = NA is defunct. Instead, specify either useNames = TRUE or useNames = FALSE. Error in saveRDS(aucellRankings, file = getIntName(scenicOptions, "aucell_rankings")) : object 'aucellRankings' not found

What should I do

hi,i have same problem same as you.if you have solved it. "Can you tell me the version of the AUCell package?

PKatarina commented 1 week ago

The problem is not with AUCell but matrixStats. My sys-admin solved it for me so I don't have the details but this worked in another case I got the same error remotes::install_version("matrixStats", version="1.1.0") # restart your session and run previous scripts

Good luck

On Fri, Jun 21, 2024 at 3:52 PM zhangbaobao123-abc @.***> wrote:

Hello, thanks for this great tool!

When I run 'runSCENIC_3_scoreCells()' with SCENIC version 1.3.1, I got the following error:

Catched error in AUCell_buildRankings() or in the histogram plot: useNames = NA is defunct. Instead, specify either useNames = TRUE or useNames = FALSE. Error in saveRDS(aucellRankings, file = getIntName(scenicOptions, "aucell_rankings")) : object 'aucellRankings' not found

What should I do

hi,i have same problem same as you.if you have solved it. "Can you tell me the version of the AUCell package?

— Reply to this email directly, view it on GitHub https://github.com/aertslab/SCENIC/issues/439#issuecomment-2182798270, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK2UYJTCGTF5GALC3WG2JKDZIQVYVAVCNFSM6AAAAABCAMEE4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBSG44TQMRXGA . You are receiving this because you commented.Message ID: @.***>