SeuratToExpressionSet is not up to date with latest Seurat version
CyrilLagger opened this issue · 4 comments
Hello,
I just noticed that your function SeuratToExpressionSet()
assumes by default that the Seurat object is of version 2, and that version 3 can be specified by the user.
Lines 47 to 48 in f8ca469
Seurat recently released their version 4, so it might be useful to update this function.
Looking at this part of your code,
Lines 55 to 65 in f8ca469
I guess it should be sufficient to modify line 60 by:
else if (version %in% c("v3", "v4")) {
and line 48 by:
version = c("v4", "v3", "v2")) {
with the versions in this order, as we can expect that most recent users will work with v4 or v3 rather than v2.
By the way, the documentation might also need to be updated accordingly here
Lines 13 to 14 in f8ca469
as the current Seurat objects don't have those slots anymore.
Hope this can help!
Hi @CyrilLagger, thank you for the suggestion and solution! I'll get around to adding this soon. Much appreciated
Has this issue been fixed in a new release? I think I am having a related problem in that when I try to load a recent Seurat object I get this error:
Error in getClass(Class, where = topenv(parent.frame())) :
“AnnotatedDataFrame” is not a defined class
Hi @gchen605, this issue has not been addressed yet. If you are using a Seurat v3 or v2 object, the issue may be caused by not loading the Biobase library (with library(Biobase)
) before running the function. It also requires the Seurat library to be loaded as well. If you are using a newer Seurat object, you can copy the source code for the SeuratToExpressionSet function and make the small edits suggested by CyrillLagger.
Thank you for the response - making the small edits as suggested worked.