Dataset explanation

10X genomics recently launched a new platform to obtain spatial expression data using a Visium Spatial Gene Expression slide.

The Visium brain data to run this tutorial can be found here

Visium technology:

High resolution png from original tissue:

![]images/general_figs/mouse_brain_highres.png)

Set up Giotto Environment

# Ensure Giotto Suite is installed.
if(!"Giotto" %in% installed.packages()) {
  pak::pkg_install("drieslab/Giotto")
}

# Ensure the Python environment for Giotto has been installed.
genv_exists = Giotto::checkGiottoEnvironment()
if(!genv_exists){
  # The following command need only be run once to install the Giotto environment.
  Giotto::installGiottoEnvironment()
}

1. Create Giotto Visium Object and visualize

library(Giotto)

# 1. set working directory
results_folder = 'path/to/result'

# Optional: Specify a path to a Python executable within a conda or miniconda 
# environment. If set to NULL (default), the Python executable within the previously
# installed Giotto environment will be used.
my_python_path = NULL # alternatively, "/local/python/path/python" if desired.

# 3. Create Giotto Instructions
instrs = createGiottoInstructions(save_dir = results_folder,
                                  save_plot = TRUE,
                                  show_plot = FALSE,
                                  python_path = my_python_path)
## provide path to visium folder
data_path = '/path/to/Brain_data/'

## directly from visium folder
visium_brain = createGiottoVisiumObject(visium_dir = data_path,
                                        expr_data = 'raw',
                                        png_name = 'tissue_lowres_image.png',
                                        gene_column_index = 2,
                                        instructions = instrs)

## show associated images with giotto object
showGiottoImageNames(visium_brain) # "image" is the default name

## check metadata
pDataDT(visium_brain)

## show plot
spatPlot2D(gobject = visium_brain, 
           cell_color = 'in_tissue', 
           point_size = 2,
           cell_color_code = c('0' = 'lightgrey', '1' = 'blue'), 
           show_image = T, 
           image_name = 'image')

2. Process Giotto Visium Object

## subset on spots that were covered by tissue
metadata = pDataDT(visium_brain)
in_tissue_barcodes = metadata[in_tissue == 1]$cell_ID
visium_brain = subsetGiotto(visium_brain, 
                            cell_ids = in_tissue_barcodes)

## filter
visium_brain <- filterGiotto(gobject = visium_brain,
                             expression_threshold = 1,
                             feat_det_in_min_cells = 50,
                             min_det_feats_per_cell = 1000,
                             expression_values = c('raw'),
                             verbose = T)

## normalize
visium_brain <- normalizeGiotto(gobject = visium_brain, 
                                scalefactor = 6000, 
                                verbose = T)

## add gene & cell statistics
visium_brain <- addStatistics(gobject = visium_brain)

## visualize
spatPlot2D(gobject = visium_brain, 
           show_image = T, 
           point_alpha = 0.7,
           cell_color = 'nr_feats', 
           color_as_factor = F)

3. Dimension Reduction

## highly variable features / genes (HVF)
visium_brain <- calculateHVF(gobject = visium_brain, 
                             save_plot = TRUE)

## run PCA on expression values (default)
gene_metadata = fDataDT(visium_brain)
featgenes = gene_metadata[hvf == 'yes' & perc_cells > 3 & mean_expr_det > 0.4]$feat_ID

## run PCA on expression values (default)
visium_brain <- runPCA(gobject = visium_brain,
                       feats_to_use = featgenes)

screePlot(visium_brain, ncp = 30)

dimPlot2D(gobject = visium_brain,
          dim_reduction_to_use = "pca")

## run UMAP and tSNE on PCA space (default)
visium_brain <- runUMAP(visium_brain, 
                        dimensions_to_use = 1:10)
plotUMAP(gobject = visium_brain)

visium_brain <- runtSNE(visium_brain, 
                        dimensions_to_use = 1:10)
plotTSNE(gobject = visium_brain)

4. Clustering

## sNN network (default)
visium_brain <- createNearestNetwork(gobject = visium_brain, 
                                     dimensions_to_use = 1:10, 
                                     k = 15)

## Leiden clustering
visium_brain <- doLeidenCluster(gobject = visium_brain, 
                                resolution = 0.4, 
                                n_iterations = 1000)

plotUMAP(gobject = visium_brain,
         cell_color = 'leiden_clus', 
         show_NN_network = T, 
         point_size = 2.5)

# spatial and dimension plots
spatDimPlot(gobject = visium_brain, 
            cell_color = 'leiden_clus',
            dim_point_size = 2, 
            spat_point_size = 2.5)

spatDimPlot(gobject = visium_brain, 
            cell_color = 'nr_feats', 
            color_as_factor = F,
            dim_point_size = 2, 
            spat_point_size = 2.5)

# dimension plots grouped by cluster
spatPlot2D(visium_brain, 
           cell_color = 'leiden_clus',
           coord_fix_ratio = 1)

Plot with group by:

spatPlot2D(visium_brain, 
           cell_color = 'leiden_clus',
           group_by = 'leiden_clus', 
           coord_fix_ratio = 1,
           cow_n_col = 6, 
           show_legend = F,
           save_param = list(base_width = 14, base_height = 14))

Highlight one or more groups:

spatPlot2D(visium_brain, 
           cell_color = 'leiden_clus',
           select_cell_groups = '8', 
           coord_fix_ratio = 1, 
           show_other_cells = TRUE,
           cell_color_code = c('8' = 'red'), 
           other_cell_color = "grey", 
           other_point_size = 1.5,
           save_param = list(base_width = 7, base_height = 7))

5. Subset data

# create and show subset
DG_subset = subsetGiottoLocs(visium_brain,
                             x_max = 6500, x_min = 3000,
                             y_max = -2500, y_min = -5500,
                             return_gobject = TRUE)

spatDimPlot(gobject = DG_subset,
            cell_color = 'leiden_clus', 
            spat_point_size = 5)

6. marker gene detection for clusters

## ------------------ ##
## Gini markers
gini_markers_subclusters = findMarkers_one_vs_all(gobject = visium_brain,
                                                  method = 'gini',
                                                  expression_values = 'normalized',
                                                  cluster_column = 'leiden_clus',
                                                  min_feats = 20,
                                                  min_expr_gini_score = 0.5,
                                                  min_det_gini_score = 0.5)

topgenes_gini = gini_markers_subclusters[, head(.SD, 2), by = 'cluster']$feats

# violinplot
violinPlot(visium_brain, 
           feats = unique(topgenes_gini), 
           cluster_column = 'leiden_clus',
           strip_text = 8, 
           strip_position = 'right',
           save_param = list(base_width = 5, base_height = 10))

# cluster heatmap
plotMetaDataHeatmap(visium_brain, 
                    selected_feats = unique(topgenes_gini),
                    metadata_cols = c('leiden_clus'),
                    x_text_size = 10, y_text_size = 10)

# umap plots
dimFeatPlot2D(visium_brain, 
              expression_values = 'scaled',
              feats = gini_markers_subclusters[, head(.SD, 1), by = 'cluster']$feats,
              cow_n_col = 4, 
              point_size = 0.75,
              save_param = list(base_width = 8, base_height = 8))

## ------------------ ##
# Scran Markers
scran_markers_subclusters = findMarkers_one_vs_all(gobject = visium_brain,
                                                   method = 'scran',
                                                   expression_values = 'normalized',
                                                   cluster_column = 'leiden_clus')

topgenes_scran = scran_markers_subclusters[, head(.SD, 2), by = 'cluster']$feats

# violinplot
violinPlot(visium_brain, 
           feats = unique(topgenes_scran), 
           cluster_column = 'leiden_clus',
           strip_text = 10, strip_position = 'right',
           save_param = list(base_width = 5))

# cluster heatmap
plotMetaDataHeatmap(visium_brain, 
                    selected_feats = topgenes_scran,
                    metadata_cols = c('leiden_clus'))

# umap plots
dimFeatPlot2D(visium_brain, 
              expression_values = 'scaled',
              feats = scran_markers_subclusters[, head(.SD, 1), by = 'cluster']$feats,
              cow_n_col = 3, 
              point_size = 1,
              save_param = list(base_width = 8, base_height = 8))

7. Cell type enrichment

Visium spatial transcriptomics does not provide single-cell resolution, making cell type annotation a harder problem. Giotto provides several ways to calculate enrichment of specific cell-type signature gene lists:

  • PAGE
  • hypergeometric test
  • Rank
  • DWLS Deconvolution Corresponded Single cell dataset can be generated from here. Giotto_SC is processed from the downsampled Loom file and can also be downloaded from GiottoData::getSpatialDataset().
# download data to results directory ####
# if wget is installed, set method = 'wget'
# if you run into authentication issues with wget, then add " extra = '--no-check-certificate' "
GiottoData::getSpatialDataset(dataset = 'scRNA_mouse_brain', directory = results_folder)

sc_expression = paste0(results_folder, "/brain_sc_expression_matrix.txt.gz")
sc_metadata = paste0(results_folder,"/brain_sc_metadata.csv")

giotto_SC = createGiottoObject(expression = sc_expression,
                               instructions = instrs)

giotto_SC = addCellMetadata(giotto_SC, 
                            new_metadata = data.table::fread(sc_metadata))

giotto_SC = normalizeGiotto(giotto_SC)

7.1 PAGE enrichment

# Create PAGE matrix
# PAGE matrix should be a binary matrix with each row represent a gene marker and each column represent a cell type
# There are several ways to create PAGE matrix
# 1.1 create binary matrix of cell signature genes
# small example #
gran_markers = c("Nr3c2", "Gabra5", "Tubgcp2", "Ahcyl2",
                 "Islr2", "Rasl10a", "Tmem114", "Bhlhe22", 
                 "Ntf3", "C1ql2")

oligo_markers = c("Efhd1", "H2-Ab1", "Enpp6", "Ninj2",
                  "Bmp4", "Tnr", "Hapln2", "Neu4",
                  "Wfdc18", "Ccp110")        

di_mesench_markers = c("Cartpt", "Scn1a", "Lypd6b",  "Drd5",
                       "Gpr88", "Plcxd2", "Cpne7", "Pou4f1",
                       "Ctxn2", "Wnt4")

PAGE_matrix_1 = makeSignMatrixPAGE(sign_names = c('Granule_neurons',
                                                  'Oligo_dendrocytes',
                                                  'di_mesenchephalon'),
                                   sign_list = list(gran_markers,
                                                    oligo_markers,
                                                    di_mesench_markers))

# ----

# 1.2 [shortcut] fully pre-prepared matrix for all cell types
sign_matrix_path = system.file("extdata", "sig_matrix.txt", package = 'GiottoData')
brain_sc_markers = data.table::fread(sign_matrix_path) 
PAGE_matrix_2 = as.matrix(brain_sc_markers[,-1])
rownames(PAGE_matrix_2) = brain_sc_markers$Event

# ---

# 1.3 make PAGE matrix from single cell dataset
markers_scran = findMarkers_one_vs_all(gobject = giotto_SC, 
                                       method = "scran",
                                       expression_values = "normalized",
                                       cluster_column = "Class", 
                                       min_feats = 3)

top_markers = markers_scran[, head(.SD, 10), by = "cluster"]
celltypes = levels(factor(markers_scran$cluster)) 

sign_list = list()

for (i in 1:length(celltypes)){
  sign_list[[i]] = top_markers[which(top_markers$cluster == celltypes[i]),]$feats
}

PAGE_matrix_3 = makeSignMatrixPAGE(sign_names = celltypes,
                                   sign_list = sign_list)

# 1.4 enrichment test with PAGE

# runSpatialEnrich() can also be used as a wrapper for all currently provided enrichment options
visium_brain <- runPAGEEnrich(gobject = visium_brain, 
                              sign_matrix = PAGE_matrix_2)

# 1.5 heatmap of enrichment versus annotation (e.g. clustering result)
cell_types_PAGE = colnames(PAGE_matrix_2)

plotMetaDataCellsHeatmap(gobject = visium_brain,
                         metadata_cols = 'leiden_clus',
                         value_cols = cell_types_PAGE,
                         spat_enr_names = 'PAGE',
                         x_text_size = 8,
                         y_text_size = 8)

# 1.6 visualizations
spatCellPlot2D(gobject = visium_brain,
               spat_enr_names = 'PAGE',
               cell_annotation_values = cell_types_PAGE[1:4],
               cow_n_col = 2,
               coord_fix_ratio = 1, 
               point_size = 1.25, 
               show_legend = T)

spatDimCellPlot2D(gobject = visium_brain,
                  spat_enr_names = 'PAGE',
                  cell_annotation_values = cell_types_PAGE[1:4],
                  cow_n_col = 1, 
                  spat_point_size = 1,
                  plot_alignment = 'horizontal',
                  save_param = list(base_width = 7, base_height = 10))

7.2 HyperGeometric test

visium_brain <- runHyperGeometricEnrich(gobject = visium_brain,
                                        expression_values = "normalized",
                                        sign_matrix = PAGE_matrix_2)

cell_types_HyperGeometric = colnames(PAGE_matrix_2)

spatCellPlot(gobject = visium_brain,
             spat_enr_names = 'hypergeometric',
             cell_annotation_values = cell_types_HyperGeometric[1:4],
             cow_n_col = 2,
             coord_fix_ratio = NULL, 
             point_size = 1.75)

7.3 Rank Enrichment

# Create rank matrix, not that rank matrix is different from PAGE
# A count matrix and a vector for all cell labels will be needed
rank_matrix = makeSignMatrixRank(sc_matrix = getExpression(giotto_SC,
                                                           values = "normalized",
                                                           output = "matrix"),
                                 sc_cluster_ids = pDataDT(giotto_SC)$Class)

colnames(rank_matrix) = levels(factor(pDataDT(giotto_SC)$Class))

visium_brain <- runRankEnrich(gobject = visium_brain, 
                              sign_matrix = rank_matrix,
                              expression_values = "normalized")

# Plot Rank enrichment result
spatCellPlot2D(gobject = visium_brain,
               spat_enr_names = 'rank',
               cell_annotation_values = colnames(rank_matrix)[1:4],
               cow_n_col = 2,
               coord_fix_ratio = 1, 
               point_size = 1,
               save_param = list(save_name = "spat_enr_Rank_plot"))

7.4 DWLS spatial deconvolution

# Create DWLS matrix, not that DWLS matrix is different from PAGE and rank
# A count matrix a vector for a list of gene signatures and a vector for all cell labels will be needed
DWLS_matrix = makeSignMatrixDWLSfromMatrix(matrix = getExpression(giotto_SC,
                                                                  values = "normalized",
                                                                  output = "matrix"),
                                           cell_type = pDataDT(giotto_SC)$Class,
                                           sign_gene = top_markers$feats)

visium_brain <- runDWLSDeconv(gobject = visium_brain, 
                              sign_matrix = DWLS_matrix)


# Plot DWLS deconvolution result
spatCellPlot2D(gobject = visium_brain,
               spat_enr_names = 'DWLS',
               cell_annotation_values = levels(factor(pDataDT(giotto_SC)$Class))[1:4],
               cow_n_col = 2,
               coord_fix_ratio = 1, 
               point_size = 1,
               save_param = list(save_name = "DWLS_plot"))

# Plot DWLS deconvolution result with Pie plots
spatDeconvPlot(visium_brain, 
               show_image = T,
               radius = 50,
               save_param = list(save_name = "spat_DWLS_pie_plot"))

8. Spatial Grid

visium_brain <- createSpatialGrid(gobject = visium_brain,
                                  sdimx_stepsize = 400,
                                  sdimy_stepsize = 400,
                                  minimum_padding = 0)

showGiottoSpatGrids(visium_brain)

spatPlot2D(visium_brain, 
           cell_color = 'leiden_clus', 
           show_grid = T,
           grid_color = 'red', 
           spatial_grid_name = 'spatial_grid')

9. spatial network

visium_brain <- createSpatialNetwork(gobject = visium_brain,
                                     method = 'kNN', 
                                     k = 5,
                                     maximum_distance_knn = 400,
                                     name = 'spatial_network')

showGiottoSpatNetworks(visium_brain)

spatPlot2D(gobject = visium_brain,  
           show_network= T,
           network_color = 'blue', 
           spatial_network_name = 'spatial_network')

10. Spatial Genes

## rank binarization
ranktest = binSpect(visium_brain, 
                    bin_method = 'rank',
                    calc_hub = T, 
                    hub_min_int = 5,
                    spatial_network_name = 'spatial_network')

spatFeatPlot2D(visium_brain, 
               expression_values = 'scaled',
               feats = ranktest$feats[1:6], 
               cow_n_col = 2, 
               point_size = 1.5)

11. Spatial Co-Expression modules

# cluster the top 500 spatial genes into 20 clusters
ext_spatial_genes = ranktest[1:1500,]$feats

# here we use existing detectSpatialCorGenes function to calculate pairwise distances between genes (but set network_smoothing=0 to use default clustering)
spat_cor_netw_DT = detectSpatialCorFeats(visium_brain,
                                         method = 'network',
                                         spatial_network_name = 'spatial_network',
                                         subset_feats = ext_spatial_genes)

# 2. identify most similar spatially correlated genes for one gene
top10_genes = showSpatialCorFeats(spat_cor_netw_DT, 
                                  feats = 'Ptprn', 
                                  show_top_feats = 10)

spatFeatPlot2D(visium_brain, 
               expression_values = 'scaled',
               feats = top10_genes$variable[1:4], 
               point_size = 3)

# cluster spatial genes
spat_cor_netw_DT = clusterSpatialCorFeats(spat_cor_netw_DT, 
                                          name = 'spat_netw_clus', 
                                          k = 20)

# visualize clusters
heatmSpatialCorFeats(visium_brain,
                     spatCorObject = spat_cor_netw_DT,
                     use_clus_name = 'spat_netw_clus',
                     heatmap_legend_param = list(title = NULL),
                     save_param = list(base_height = 6, base_width = 8, units = 'cm'))

# 4. rank spatial correlated clusters and show genes for selected clusters
netw_ranks = rankSpatialCorGroups(visium_brain,
                                  spatCorObject = spat_cor_netw_DT, 
                                  use_clus_name = 'spat_netw_clus',
                                  save_param = list(base_height = 3, base_width = 5))

top_netw_spat_cluster = showSpatialCorFeats(spat_cor_netw_DT, 
                                            use_clus_name = 'spat_netw_clus',
                                            selected_clusters = 6, 
                                            show_top_feats = 1)

# 5. create metagene enrichment score for clusters
cluster_genes_DT = showSpatialCorFeats(spat_cor_netw_DT, 
                                       use_clus_name = 'spat_netw_clus', 
                                       show_top_feats = 1)

cluster_genes = cluster_genes_DT$clus 
names(cluster_genes) = cluster_genes_DT$feat_ID

visium_brain <- createMetafeats(visium_brain, 
                                feat_clusters = cluster_genes, 
                                name = 'cluster_metagene')

spatCellPlot(visium_brain,
             spat_enr_names = 'cluster_metagene',
             cell_annotation_values = netw_ranks$clusters,
             point_size = 1, 
             cow_n_col = 5, 
             save_param = list(base_width = 15))

12. Spatially informed clusters

# top 30 genes per spatial co-expression cluster
table(spat_cor_netw_DT$cor_clusters$spat_netw_clus)

coexpr_dt = data.table::data.table(genes = names(spat_cor_netw_DT$cor_clusters$spat_netw_clus),
                                   cluster = spat_cor_netw_DT$cor_clusters$spat_netw_clus)

data.table::setorder(coexpr_dt, cluster)
top30_coexpr_dt = coexpr_dt[, head(.SD, 30) , by = cluster]
my_spatial_genes = top30_coexpr_dt$genes


visium_brain <- runPCA(gobject = visium_brain,
                       feats_to_use = my_spatial_genes,
                       name = 'custom_pca')

visium_brain <- runUMAP(visium_brain, 
                        dim_reduction_name = 'custom_pca', 
                        dimensions_to_use = 1:20,
                        name = 'custom_umap')

visium_brain <- createNearestNetwork(gobject = visium_brain,
                                     dim_reduction_name = 'custom_pca',
                                     dimensions_to_use = 1:20, 
                                     k = 5,
                                     name = 'custom_NN')

visium_brain <- doLeidenCluster(gobject = visium_brain, 
                                network_name = 'custom_NN',
                                resolution = 0.15, 
                                n_iterations = 1000,
                                name = 'custom_leiden')

cell_meta = pDataDT(visium_brain)
cell_clusters = unique(cell_meta$custom_leiden)

selected_colors = getDistinctColors(length(cell_clusters))
names(selected_colors) = cell_clusters

spatPlot2D(visium_brain, 
           cell_color = 'custom_leiden', 
           cell_color_code = selected_colors, 
           coord_fix_ratio = 1)

plotUMAP(gobject = visium_brain, 
         cell_color = 'custom_leiden', 
         cell_color_code = selected_colors, 
         point_size = 1.5)

13. Spatial domains with HMRF

# do HMRF with different betas on top 30 genes per spatial co-expression module
hmrf_folder = paste0(results_folder,'/','11_HMRF/')
if(!file.exists(hmrf_folder)) dir.create(hmrf_folder, recursive = T)

HMRF_spatial_genes = doHMRF(gobject = visium_brain,
                            expression_values = 'scaled',
                            spatial_genes = my_spatial_genes, 
                            k = 20,
                            spatial_network_name="spatial_network",
                            betas = c(0, 10, 5),
                            output_folder = paste0(hmrf_folder, '/', 'Spatial_genes/SG_topgenes_k20_scaled'))

visium_brain <- addHMRF(gobject = visium_brain, 
                        HMRFoutput = HMRF_spatial_genes,
                        k = 20, 
                        betas_to_add = c(0, 10, 20, 30, 40),
                        hmrf_name = 'HMRF')

spatPlot2D(gobject = visium_brain, 
           cell_color = 'HMRF_k20_b.40')

14. Session info

R version 4.3.2 (2023-10-31)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.3.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] shiny_1.8.0       Giotto_4.0.2      GiottoClass_0.1.3

loaded via a namespace (and not attached):
  [1] later_1.3.2                 bitops_1.0-7                tibble_3.2.1               
  [4] R.oo_1.26.0                 polyclip_1.10-6             lifecycle_1.0.4            
  [7] Rdpack_2.6                  edgeR_4.0.14                doParallel_1.0.17          
 [10] globals_0.16.2              lattice_0.22-5              MASS_7.3-60.0.1            
 [13] backports_1.4.1             magrittr_2.0.3              limma_3.58.1               
 [16] sass_0.4.8                  rmarkdown_2.25              jquerylib_0.1.4            
 [19] yaml_2.3.8                  metapod_1.10.1              httpuv_1.6.14              
 [22] reticulate_1.35.0           cowplot_1.1.3               RColorBrewer_1.1-3         
 [25] abind_1.4-5                 zlibbioc_1.48.0             Rtsne_0.17                 
 [28] quadprog_1.5-8              GenomicRanges_1.54.1        purrr_1.0.2                
 [31] R.utils_2.12.3              BiocGenerics_0.48.1         RCurl_1.98-1.14            
 [34] pracma_2.4.4                tweenr_2.0.2                circlize_0.4.15            
 [37] GenomeInfoDbData_1.2.11     IRanges_2.36.0              S4Vectors_0.40.2           
 [40] ggrepel_0.9.5               irlba_2.3.5.1               listenv_0.9.1              
 [43] terra_1.7-71                dqrng_0.3.2                 parallelly_1.36.0          
 [46] DelayedMatrixStats_1.24.0   colorRamp2_0.1.0            codetools_0.2-19           
 [49] DelayedArray_0.28.0         scuttle_1.12.0              ggforce_0.4.1              
 [52] tidyselect_1.2.0            shape_1.4.6                 farver_2.1.1               
 [55] ScaledMatrix_1.10.0         matrixStats_1.2.0           stats4_4.3.2               
 [58] GiottoData_0.2.7.0          jsonlite_1.8.8              GetoptLong_1.0.5           
 [61] BiocNeighbors_1.20.2        ellipsis_0.3.2              progressr_0.14.0           
 [64] iterators_1.0.14            systemfonts_1.0.5           foreach_1.5.2              
 [67] dbscan_1.1-12               tools_4.3.2                 ragg_1.2.7                 
 [70] Rcpp_1.0.12                 glue_1.7.0                  SparseArray_1.2.3          
 [73] xfun_0.42                   MatrixGenerics_1.14.0       GenomeInfoDb_1.38.6        
 [76] dplyr_1.1.4                 withr_3.0.0                 fastmap_1.1.1              
 [79] bluster_1.12.0              fansi_1.0.6                 digest_0.6.34              
 [82] rsvd_1.0.5                  R6_2.5.1                    mime_0.12                  
 [85] textshaping_0.3.7           colorspace_2.1-0            Cairo_1.6-2                
 [88] gtools_3.9.5                R.methodsS3_1.8.2           utf8_1.2.4                 
 [91] tidyr_1.3.1                 generics_0.1.3              smfishHmrf_0.1             
 [94] data.table_1.15.0           FNN_1.1.4                   S4Arrays_1.2.0             
 [97] scatterpie_0.2.1            uwot_0.1.16                 pkgconfig_2.0.3            
[100] gtable_0.3.4                ComplexHeatmap_2.18.0       GiottoVisuals_0.1.4        
[103] SingleCellExperiment_1.24.0 XVector_0.42.0              htmltools_0.5.7            
[106] clue_0.3-65                 scales_1.3.0                Biobase_2.62.0             
[109] GiottoUtils_0.1.5           png_0.1-8                   SpatialExperiment_1.12.0   
[112] scran_1.30.2                ggfun_0.1.4                 knitr_1.45                 
[115] rstudioapi_0.15.0           reshape2_1.4.4              rjson_0.2.21               
[118] checkmate_2.3.1             cachem_1.0.8                GlobalOptions_0.1.2        
[121] stringr_1.5.1               parallel_4.3.2              miniUI_0.1.1.1             
[124] RcppZiggurat_0.1.6          pillar_1.9.0                grid_4.3.2                 
[127] vctrs_0.6.5                 promises_1.2.1              BiocSingular_1.18.0        
[130] beachmat_2.18.0             xtable_1.8-4                cluster_2.1.6              
[133] evaluate_0.23               magick_2.8.2                cli_3.6.2                  
[136] locfit_1.5-9.8              compiler_4.3.2              rlang_1.1.3                
[139] crayon_1.5.2                future.apply_1.11.1         labeling_0.4.3             
[142] fs_1.6.3                    plyr_1.8.9                  stringi_1.8.3              
[145] BiocParallel_1.36.0         munsell_0.5.0               Matrix_1.6-5               
[148] sparseMatrixStats_1.14.0    future_1.33.1               ggplot2_3.4.4              
[151] statmod_1.5.0               SummarizedExperiment_1.32.0 rbibutils_2.2.16           
[154] Rfast_2.1.0                 igraph_2.0.1.1              memoise_2.0.1              
[157] RcppParallel_5.1.7          bslib_0.6.1