Closed Sharonbdr closed 9 months ago
Hi,
Sorry. It is indeed a Matrix issue and has been reported multiple time. When you say you cannot downgrade Matrix, what kind of error message did you receive?
remotes::install_version("Matrix", version = "1.6-1.1")
Error: package or namespace load failed for ‘SeuratObject’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): namespace ‘Matrix’ 1.6-1.1 is being loaded, but >= 1.6.3 is required
Hi,
This is strange. Can you try re-install Seurat and SeuratObject from CRAN directly? The latest SeuratObject (v5.0.1) will install the latest Matrix (v.1.6-4) will be installed. This should no longer cause any issue.
Can you check your as.matrix(UMIs)
to see if there is really any cell with enough min.features (>=200) ?
Didn't work. When creating a Seurat object without that threshold and looking at the minimum number of nFeature_RNA it returns 459. So technically I don't actually need this threshold but this is just one example.
Hi, This is really strange and we cannot reproduce it from our end. Glad that the workaround of not using min.features works. If possible, please try using the latest Matrix package and try again. Or if you can provide us a minimal reproducible dataset (either your own data or any data from our vignette) it will be very helpful.
Hi, I am closing this issue for now. I will re-open if the issue persists.
This table can produce the error if you still want to investigate the issue. It is publicly available under GSM5140521
GSM5140521_Young-2-ProxCol.csv.gz
test.R
library(tidyverse)
library(Seurat)
table = read.csv("GSE168448_ageing_colon/data/GSM5140521_Young-2-ProxCol.csv.gz") %>% column_to_rownames("X")
seurat = CreateSeuratObject(table, min.cells = 20, min.features = 50)
Error in validObject(.Object) (test.R#4): invalid class “LogMap” object: Rownames must be supplied
I have seen the same error and it turns out to be your min.features parameters is too high, thus leading to no filtered features (genes of your rownames) detected. Try to low down your min.features = 1. And the error will be resolved.
Bests.
I meet the same question. So I check the data and find that there isn't really any cell with enough min.features (>=200) .
Hi, this issue was posted on Stackoverflow, I've posted an answer there. Here is the link to the post:
I've been trying to create a Seurat object:
nuc.seurat <- CreateSeuratObject(counts = as.matrix(UMIs), project = i, min.cells = 3, min.features = 200)
however I keep on getting the following error:
The weird thing is, just a day ago it worked completely fine with the exact same pipline. UMIs in this case is a count dataframe, and it has rownames (despite what the error is suggesting):
(UMIs is a lot larger this is just a subset)
I do not have a lot of experience in R or using Seurat so any input would help! Thank you!
I have tried removing some of the input args of CreateSeuratObject and that did work:
nuc.seurat <- CreateSeuratObject(counts = as.matrix(UMIs), project = i, min.cells = 3)
However, filtering by min.features at this step reduces object size and eliminates other error down the line (NA data and so on). So it's not a good enough solution.
Also, trying to downgrade Matrix produces an incompatibility error so I cannot run CreateSeuratObject .
Seurat v 5.0.1 Matrix v 1.6-3