Skip to content

Commit

Permalink
update seurat_sfe_coerce.Rmd
Browse files Browse the repository at this point in the history
  • Loading branch information
alikhuseynov authored May 30, 2024
1 parent 495b15e commit 0066e7c
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions vignettes/seurat_sfe_coerce.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ plotSpatialFeature(sfe_conv_vis2, exprs_values = "counts",
sfe_vishd <-
toSpatialFeatureExperiment(x = obj_vishd,
image_scalefactors = "lowres",
unit = "micron",
unit = "micron", #"full_res_image_pixel",
BPPARAM = BPPARAM)
sfe_vishd
getMeta(sfe_vishd) %>% str
Expand Down Expand Up @@ -357,23 +357,6 @@ plotSpatialFeature(sfe_vis_multi, exprs_values = "counts",
scattermore = FALSE
)
```
## TODO: Convert multiple samples/FOVs - Visium HD (only "counts" present in both samples)
```{r}
# slim down Visium HD to keep only "counts" for all FOVs/samples
if (!exists("obj_vishd_multi_slim"))
obj_vishd_multi_slim <-
DietSeurat(obj_vishd_multi, layers = "counts", assays = Assays(obj_vishd_multi)) %>%
UpdateSeuratObject()
sfe_vishd_multi <-
toSpatialFeatureExperiment(x = obj_vishd_multi_slim,
image_scalefactors = "lowres",
unit = "micron",
BPPARAM = BPPARAM)
sfe_vishd_multi
getMeta(sfe_vishd_multi) %>% str
```



## TODO: Convert multiple samples/FOVs - Visium HD
```{r}
Expand All @@ -394,11 +377,12 @@ plotSpatialFeature(sfe_vishd_multi, exprs_values = "counts",
dark = TRUE,
show_axes = TRUE,
sample_id = sampleIDs(sfe_vishd_multi)[1],
scattermore = FALSE
scattermore = TRUE
)
# 16 microns better plotted using polygons
plotSpatialFeature(sfe_vishd_multi, exprs_values = "counts",
features = rownames(sfe_vishd_multi)[1],
#size = 1, colGeometryName = "spotPoly",
size = 0, colGeometryName = "spotPoly",
dark = TRUE,
show_axes = TRUE,
sample_id = sampleIDs(sfe_vishd_multi)[2],
Expand Down

0 comments on commit 0066e7c

Please sign in to comment.