Reputation: 97
I have a scRNA dataset with 10 healthy controls and 17 patients. I am doing the comparative analysis. I did the following:
data <- lapply(data, function(x) {
x <- NormalizeData(x)
x <- FindVariableFeatures(x, selection.method = "vst", nfeatures = 2000)
})
I am getting the following error:
Error in as(object = data, Class = "dgCMatrix") : no method or default for coercing “patchwork” to “dgCMatrix”
Please help
Upvotes: 1
Views: 164
Reputation: 56
After some trial and error I was able to reproduce your same error running this line of code before your lapply function:
data <- list(p1 + p2 , p2)
Where p1 and p2 are ggplot objects.
It looks to me that in your data list you don't have Seurat objects. You should check for any mistakes in the code that you have used to generate your list of seurat objects.
I hope this helps :)
Upvotes: 0