Open lambdamoses opened 7 months ago
Assigned to @mingqizh
Inspect internals:
library(SingleCellExperiment)
devtools::load_all()
# Inspect the internals
int_colData(sfe)
You should see that int_colData(sfe)
is a DataFrame
(S4 data frame), with columns that include reducedDims
, spatialCoords
, and colGeometries
. The columns themselves can be DataFrame
s. Next run int_colData(sfe)$colGeometries
to see the internals of colGeometries
. It should be a DataFrame
whose columns are sf
data frames. Then simply reorder the columns of int_colData(sfe)$colGeometries
so the first column is the primary colGeometry
.
In practice there usually is a primary
colGeometry
, and we can reorder thecolGeometries
so the first one is the primary one, like cell segmentation in MERFISH and Visium spots (or you can change it to the centroids). Maybe we can have a convenience function to do such reordering since many functions default to the first one.