Open ppm1337 opened 1 month ago
Thank you for taking the time for writing this issue and for diagnosing the problem regarding the new class structure. FYI, I am currently very busy with some upcoming deadlines over the next couple of weeks, so I will not be able to push a fix for this until late June or early July. For now you might want to just use Seurat 4 if possible.
Thanks for considering the support of the VisiumV2
class in the future. I've also opened an issue in the Seurat repository regarding the handling of the different image classes. A Seurat maintainer specifically addressed hdWGCNA
in their reply, so you may want to check out the corresponding Seurat issue.
Thank you for taking the time for writing this issue and for diagnosing the problem regarding the new class structure. FYI, I am currently very busy with some upcoming deadlines over the next couple of weeks, so I will not be able to push a fix for this until late June or early July. For now you might want to just use Seurat 4 if possible.
Thank you! I have same problems. Do you find the way to get the row, col, imagerow, and imagecol in Seurat 5.1.0?just like the tutorial https://smorabit.github.io/hdWGCNA/articles/ST_basics.html,
I can't find coordinates in this data and I try to run
coords <- GetTissueCoordinates(cur_seurat)
coords <- coords[, 1:2]
colnames(coords) <- c("row", "col")
still lack two cols. And I try to install Seurat V4, it's still not work
The easiest workaround without downgrading to Seurat v4 is to use the coordinates directly from the spaceranger output (<space_ranger_dir>/outs/spatial/tissue_positions.csv
) and bind them to the meta data of the SeuratObject. To obtain these from the file, you could use the Seurat::Read10X_Coordinates
method. Alternatively, you can just use Seurat::GetTissueCoordinates
on the SeuratObject with VisiumV2
image(s) and provide different scale
parameters to obtain the relevant (scaled/unscaled) coordinates.
However, this will not prevent the error described in this issue because hdWGCNA::ConstructMetaspots
will try to access the coordinates
slot of the input SeuratObject. A workaround to create a VisiumV1
object manually is described in the linked Seurat issue.
不降级到Seurat v4的最简单解决方法是直接使用spaceranger输出(
<space_ranger_dir>/outs/spatial/tissue_positions.csv
)的坐标,并将其绑定到SeuratObject的元数据。要从文件中获取这些,您可以使用Seurat::Read10X_Coordinates
方法。或者,您只需在带有VisiumV2
图像的SeuratObject上使用Seurat::GetTissueCoordinates
,并提供不同的scale
参数来获得相关的(缩放/未缩放)坐标。然而,这不会阻止此问题中描述的错误,因为
hdWGCNA::ConstructMetaspots
将尝试访问输入SeuratObject的coordinates
插槽。链接的Seurat问题中描述了手动创建VisiumV1
对象的变通方法。The easiest workaround without downgrading to Seurat v4 is to use the coordinates directly from the spaceranger output (
<space_ranger_dir>/outs/spatial/tissue_positions.csv
) and bind them to the meta data of the SeuratObject. To obtain these from the file, you could use theSeurat::Read10X_Coordinates
method. Alternatively, you can just useSeurat::GetTissueCoordinates
on the SeuratObject withVisiumV2
image(s) and provide differentscale
parameters to obtain the relevant (scaled/unscaled) coordinates.However, this will not prevent the error described in this issue because
hdWGCNA::ConstructMetaspots
will try to access thecoordinates
slot of the input SeuratObject. A workaround to create aVisiumV1
object manually is described in the linked Seurat issue.
so,seurat or hdwgcna must do some changes, and I notice that dcollins15 said he will make a patch soon, so we can wait for him
Since Seurat v5.1 the default image class (also for non-Visium HD data) is
VisiumV2
. Unfortunately, the resulting object has a completely different structure and hence no slot anymore calledcoordinates
, whichConstructMetaspots
tries to access:I came across the error following the described workflow for Visium ST data when calling
MetaspotsByGroups
.The SeuratObject I'm using returns
5.0.2
when checking it'sversion
slot.R session info