Entering edit mode
2.1 years ago
sandy
•
0
Hello everyone,
Please help me solve this problem.
My code is: p9<-CreateSeuratObject(counts = p9, min.features = 200, min.cells = 3, project='panc_health')
.
The R said the error is:
Error in UseMethod(generic = "as.sparse", object = x) :
no applicable method for 'as.sparse' applied to an object of class "Seurat".
I do not understand the problem. Please help.
My read files are: matrix, barcode, and features.gz files.
Please, do not shotgun multiple posts on the same problem:
CreateSeuratObject problem
CreatSeuratObject command issue
input scrna seq data file into R on linux Conda environment
CreatSeuratObject command issue
Lets solve it in this post here. It creates unnecessary effort if you do that sort of posting.
Please provide all code that let to the problem. It seems that p9 is already a Seurat object.
Ok, I will do that. Thanks
Can you include the code you used to create the
p9
variable?as.sparse is a function that is used to convert between data frames into sparse matrices. The error is saying that p9 variable cannot be changed into a sparse matrix. It looks like the count data is also called p9. Would you be able to change the variable names so that the count data has a different name to the the first p9? This might help.