Open emcramer opened 5 months ago
Can you reinstall SPATA2 and test, if it works now?
I reinstalled the package and tried again, but I get a different error:
> seurat_t313 <- asSeurat(spata2_t313)
Error in validObject(.Object) :
invalid class “VisiumV1” object: 1: invalid object for slot "scale.factors" in class "VisiumV1": got class "NULL", should be or extend class "scalefactors"
invalid class “VisiumV1” object: 2: invalid object for slot "spot.radius" in class "VisiumV1": got class "NULL", should be or extend class "numeric"
Hi @emcramer, thanks for raising this, I found a bug in asSeurat. Please re-install SPATA2 and try again.
Otherwise, to transfer barcode metadata from SPATA2 to Seurat, an easy solution is:
meta_col <- as.data.frame(SPATA2::getFeatureDf(spata_object)[c("barcodes","column_to_transfer")])
seurat_object <- Seurat::AddMetaData(seurat_object, meta_col)
Hope that helps!
When I try to convert a SPATA object to Seurat, I get the following error using
SPATA2::asSeurat()
:I updated to the latest version of confuns yesterday (commit 3f03060dbc86545313bfbb7634741bc2bdc6f7bd, and that solved another issue, however, I still get the above error message. My code finishes running in the R console but no Seurat object (i.e. seurat_t313) is generated. Any thoughts as to why this is happening? Do I need to provide another parameter?
Thanks!
Here is my session info (in case that is helpful):