scplotter to work with SlideSeq data prepared by Seurat¶
See: https://satijalab.org/seurat/articles/spatial_vignette#slide-seq
Go back to scplotter documentation: https://pwwang.github.io/scplotter/
InĀ [1]:
options(future.globals.maxSize = 512 * 1024^3) # 512 GB
suppressPackageStartupMessages({
library(Seurat)
library(SeuratData)
})
# Load the scplotter package
# library(scplotter)
devtools::load_all()
# devtools::load_all("../../../plotthis")
suppressWarnings(suppressMessages({
# InstallData("ssHippo")
slide.seq <- LoadData("ssHippo")
slide.seq <- SCTransform(slide.seq, assay = "Spatial", ncells = 3000, verbose = FALSE)
slide.seq <- RunPCA(slide.seq)
slide.seq <- RunUMAP(slide.seq, dims = 1:30)
slide.seq <- FindNeighbors(slide.seq, dims = 1:30)
slide.seq <- FindClusters(slide.seq, resolution = 0.3, verbose = FALSE)
}))
# slide.seq <- qs2::qs_read("data/slide.seq.qs")
slide.seq
ā¹ Loading scplotter
An object of class Seurat 42639 features across 53173 samples within 2 assays Active assay: SCT (19375 features, 3000 variable features) 3 layers present: counts, data, scale.data 1 other assay present: Spatial 2 dimensional reductions calculated: pca, umap 1 image present: image
InĀ [2]:
options(repr.plot.width = 12, repr.plot.height = 6)
slide.seq$log_nCount_Spatial <- log(slide.seq$nCount_Spatial)
p1 <- FeatureStatPlot(slide.seq, features = "log_nCount_Spatial",
ident = "orig.ident", add_point = TRUE, legend.position = "none")
p2 <- SpatFeaturePlot(slide.seq, features = "log_nCount_Spatial", points_size = 0.5)
p1 + p2
InĀ [3]:
options(repr.plot.width = 12, repr.plot.height = 6)
p1 <- CellDimPlot(slide.seq, reduction = "umap", label = TRUE)
p2 <- SpatDimPlot(slide.seq, points_size = 0.5)
p1 + p2
InĀ [4]:
options(repr.plot.width = 6, repr.plot.height = 5)
SpatDimPlot(slide.seq, highlight = "seurat_clusters == 5",
highlight_color = "red", points_size = 0.5, highlight_size = 0.2)
InĀ [7]:
options(repr.plot.width = 12, repr.plot.height = 8)
SpatFeaturePlot(slide.seq, size = 0.1,
features = c("PCP4", "TTR", "PRKCD", "GM5741", "NWD2", "DDN"))
InĀ [8]:
options(repr.plot.width = 12, repr.plot.height = 8)
SpatFeaturePlot(slide.seq, size = 0.1, upper_quantile = 0.95,
features = c("PCP4", "TTR", "PRKCD", "GM5741", "NWD2", "DDN"))
InĀ [6]:
x <- sessionInfo()
x <- capture.output(print(x))
# hide the BLAS/LAPACK paths
x <- x[!startsWith(x, "BLAS/LAPACK:")]
cat(paste(x, collapse = "\n"))
R version 4.3.3 (2024-02-29) Platform: x86_64-conda-linux-gnu (64-bit) Running under: Red Hat Enterprise Linux 8.10 (Ootpa) Matrix products: default locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C time zone: America/Chicago tzcode source: system (glibc) attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] scplotter_0.4.0 stxKidney.SeuratData_0.1.0 [3] stxBrain.SeuratData_0.1.2 ssHippo.SeuratData_3.1.4 [5] pbmc3k.SeuratData_3.1.4 bmcite.SeuratData_0.3.0 [7] SeuratData_0.2.2.9001 Seurat_5.3.0 [9] SeuratObject_5.0.2 sp_2.1-4 loaded via a namespace (and not attached): [1] fs_1.6.4 matrixStats_1.1.0 [3] spatstat.sparse_3.1-0 bitops_1.0-7 [5] sf_1.0-20 devtools_2.4.5 [7] httr_1.4.7 RColorBrewer_1.1-3 [9] repr_1.1.7 profvis_0.3.8 [11] tools_4.3.3 sctransform_0.4.1 [13] utf8_1.2.4 R6_2.5.1 [15] lazyeval_0.2.2 uwot_0.1.16 [17] urlchecker_1.0.1 withr_3.0.1 [19] gridExtra_2.3 progressr_0.14.0 [21] quantreg_5.98 cli_3.6.3 [23] Biobase_2.62.0 Cairo_1.6-2 [25] spatstat.explore_3.2-6 fastDummies_1.7.3 [27] iNEXT_3.0.1 labeling_0.4.3 [29] spatstat.data_3.1-2 proxy_0.4-27 [31] ggridges_0.5.6 pbapply_1.7-2 [33] pbdZMQ_0.3-11 stringdist_0.9.12 [35] parallelly_1.38.0 sessioninfo_1.2.2 [37] VGAM_1.1-12 rstudioapi_0.16.0 [39] generics_0.1.3 shape_1.4.6.1 [41] ica_1.0-3 spatstat.random_3.2-3 [43] dplyr_1.1.4 Matrix_1.6-5 [45] fansi_1.0.6 S4Vectors_0.40.2 [47] abind_1.4-5 terra_1.8-42 [49] lifecycle_1.0.4 SummarizedExperiment_1.32.0 [51] SparseArray_1.2.2 Rtsne_0.17 [53] glmGamPoi_1.14.0 grid_4.3.3 [55] promises_1.3.0 crayon_1.5.3 [57] miniUI_0.1.1.1 lattice_0.22-6 [59] cowplot_1.1.3 pillar_1.9.0 [61] GenomicRanges_1.54.1 rjson_0.2.21 [63] future.apply_1.11.2 codetools_0.2-20 [65] glue_1.8.0 data.table_1.15.4 [67] remotes_2.5.0 vctrs_0.6.5 [69] png_0.1-8 spam_2.11-0 [71] gtable_0.3.5 assertthat_0.2.1 [73] cachem_1.1.0 S4Arrays_1.2.0 [75] mime_0.12 tidygraph_1.3.0 [77] survival_3.7-0 SingleCellExperiment_1.24.0 [79] units_0.8-5 ellipsis_0.3.2 [81] fitdistrplus_1.1-11 scRepertoire_2.2.1 [83] ROCR_1.0-11 nlme_3.1-165 [85] usethis_2.2.3 RcppAnnoy_0.0.22 [87] evd_2.3-7.1 GenomeInfoDb_1.38.1 [89] rprojroot_2.0.4 irlba_2.3.5.1 [91] KernSmooth_2.23-24 DBI_1.2.3 [93] plotthis_0.7.1 colorspace_2.1-1 [95] BiocGenerics_0.48.1 tidyselect_1.2.1 [97] compiler_4.3.3 SparseM_1.84 [99] xml2_1.3.6 desc_1.4.3 [101] ggdendro_0.2.0 DelayedArray_0.28.0 [103] plotly_4.10.4 scales_1.3.0 [105] classInt_0.4-10 lmtest_0.9-40 [107] rappdirs_0.3.3 stringr_1.5.1 [109] digest_0.6.37 goftest_1.2-3 [111] spatstat.utils_3.1-1 XVector_0.42.0 [113] htmltools_0.5.8.1 pkgconfig_2.0.3 [115] base64enc_0.1-3 sparseMatrixStats_1.14.0 [117] MatrixGenerics_1.14.0 fastmap_1.2.0 [119] rlang_1.1.4 GlobalOptions_0.1.2 [121] htmlwidgets_1.6.4 shiny_1.8.1.1 [123] DelayedMatrixStats_1.24.0 farver_2.1.2 [125] zoo_1.8-12 jsonlite_1.8.8 [127] RCurl_1.98-1.13 magrittr_2.0.3 [129] GenomeInfoDbData_1.2.11 dotCall64_1.2 [131] patchwork_1.3.0 IRkernel_1.3.2 [133] munsell_0.5.1 Rcpp_1.0.13 [135] evmix_2.12 ggnewscale_0.5.0 [137] viridis_0.6.5 reticulate_1.38.0 [139] truncdist_1.0-2 stringi_1.8.7 [141] ggalluvial_0.12.5 ggraph_2.2.1 [143] zlibbioc_1.48.0 MASS_7.3-60.0.1 [145] plyr_1.8.9 pkgbuild_1.4.4 [147] parallel_4.3.3 listenv_0.9.1 [149] ggrepel_0.9.6 forcats_1.0.0 [151] deldir_2.0-4 graphlayouts_1.1.0 [153] IRdisplay_1.1 splines_4.3.3 [155] gridtext_0.1.5 tensor_1.5 [157] circlize_0.4.16 igraph_1.5.1 [159] uuid_1.2-0 spatstat.geom_3.2-9 [161] cubature_2.1.1 RcppHNSW_0.6.0 [163] reshape2_1.4.4 stats4_4.3.3 [165] pkgload_1.3.4 evaluate_0.24.0 [167] tweenr_2.0.3 httpuv_1.6.15 [169] MatrixModels_0.5-3 RANN_2.6.1 [171] tidyr_1.3.1 purrr_1.0.2 [173] polyclip_1.10-6 future_1.34.0 [175] scattermore_1.2 ggplot2_3.5.1 [177] ggforce_0.4.2 xtable_1.8-4 [179] e1071_1.7-14 RSpectra_0.16-1 [181] later_1.3.2 class_7.3-22 [183] viridisLite_0.4.2 gsl_2.1-8 [185] tibble_3.2.1 memoise_2.0.1 [187] IRanges_2.36.0 cluster_2.1.6 [189] globals_0.16.3