wu-yc / scMetabolism

Quantifying metabolism activity at the single-cell resolution
BSD 3-Clause "New" or "Revised" License
114 stars 47 forks source link

Error: useNames = NA is defunct. Instead, specify either useNames = TRUE or useNames = FALSE. #26

Open EvaChung6 opened 10 months ago

EvaChung6 commented 10 months ago

When I used "AUCell" and "VISION" method in sc.metabolism.Seurat, I got different errors.

scRNA_metab<-sc.metabolism.Seurat(obj = scRNA_metab, method = 'AUCell', imputation = F, ncores = 2, metabolism.type = "KEGG")

Your choice is: KEGG
Start quantify the metabolism activity...
Error: useNames = NA is defunct. Instead, specify either useNames = TRUE or useNames = FALSE.
Called from: .Defunct(msg = "useNames = NA is defunct. Instead, specify either useNames = TRUE or useNames = FALSE.", 
    package = .packageName)

When I used "VISION" method:

scRNA_metab<-sc.metabolism.Seurat(obj = scRNA_metab, method = 'VISION', imputation = F, ncores = 2, metabolism.type = "KEGG")

Your choice is: KEGG
Start quantify the metabolism activity...
Removing 2 genes with duplicate IDs (ignoring case): C2ORF15

Loading data from /usr/local/lib/R/site-library/scMetabolism/data/KEGG_metabolism_nc.gmt ...

Using 15806/20500 genes detected in 0.10% of cells for signature analysis.
See the `sig_gene_threshold` input to change this behavior.

Beginning Analysis

Computing a latent space for expression data...

Determining projection genes...
    Applying Threshold filter...removing genes detected in less than 50 cells
      Genes Retained: 8922
    Applying Fano filter...removing genes with Fano < 2.0 MAD in each of 30 bins
      Genes Retained: 1201

Clustering cells...completed

Projecting data into 2 dimensions...
  Running method 1/1: tSNE30 ...

Evaluating signature scores on cells...

Error: (converted from warning) 'as(<matrix>, "dgeMatrix")' is deprecated.
Use 'as(as(as(., "dMatrix"), "generalMatrix"), "unpackedMatrix")' instead.
See help("Deprecated") and help("Matrix-deprecated").
Called from: doWithOneRestart(return(expr), restart)

How to solve the problem?Thank you very much!

wu-yc commented 10 months ago

Please use Seurat V4, rather than V5

Noralii commented 10 months ago

Please use Seurat V4, rather than V5

I am using Seurat4, but I still encountered the same problem mentioned above.

jsdhsjdd commented 10 months ago

I met the same problem. do you sovle the problem?

EvaChung6 commented 10 months ago

Please use Seurat V4, rather than V5

I used Seurat V4, but I still got these error.

HaotongZhang-Pitt commented 8 months ago

I suspect the problem comes from the AUCell package (my version is 1.12.0). Another discussion https://github.com/aertslab/SCENIC/issues/439 suggested downgrading the Bioconductor version to 3.17, but it didn't work for me.

HenrikBengtsson commented 7 months ago

Error: useNames = NA is defunct. Instead, specify either useNames = TRUE or useNames = FALSE.

FYI, this defunct error comes from matrixStats (>= 1.2.0) [2023-12-11]. I'll clarify that fact in the next release. There is some function is some package that calls one of the matrixStats functions with argument useNames = NA, which is now defunct. To identify which function, call traceback() immediately after you get the error. This has been deprecated for years, so there should have been lots of warnings since.