Skip to contents

Discovering Spatial Ecotypes

SpatialEcoTyper()
Identify Spatial EcoTypes from Single-cell Spatial Data (A Single Sample)
MultiSpatialEcoTyper()
Integrate Multiple Spatial Transcriptomics Datasets to Identify Conserved Spatial Ecotypes
IntegrateSpatialEcoTyper()
Integrate Multiple Spatial Transcriptomics Datasets to Identify Conserved Spatial Ecotypes
GetSpatialMetacells()
Construct Spatial Metacells from Single-Cell Spatial Data
SNF2()
Enhanced Similarity Network Fusion
ComputeFCs()
Compute Cell-Type-Specific Fold Changes (FCs) for Spatial Clusters
GetPCList()
Generate Principal Component (PC) List for Spatial Neighborhoods
getSN()
Construct Similarity Network
GetSNList()
Construct Cell-Type-Specific Similarity Network
Integrate()
Integrate Spatial Clusters From Multiple Samples Via Similarity Network Fusion

Identifying SE-Specific Cell States

Identifying SE-specific cell states via leave-one-sample-out cross-validation.

LoocvPredict()
Perform leave-one-out cross-validation (LOOCV) for SE prediction
ComputeMetrics()
Assess concordance between true and predicted spatial ecotype labels

NMF Model Development for Spatial Ecotype Recovery and Deconvolution

Developing NMF models for recovering spatial ecotypes from single-cell spatial data, scRNA-seq data, Visium spatial data, or bulk tumor expression data.

CreatePseudobulks()
Create Pseudo-bulk Mixtures
NMFGenerateW()
Train SE Deconvolution Model
NMFGenerateWList()
Train Cell Type-Specific NMF Models for Recovering Spatial EcoTypes
AggregateRecoverModels()
Aggregate recovery models across runs

Recovering Spatial Ecotypes

Recovering spatial ecotypes from single-cell spatial transcriptomics, scRNA-seq, Visium, or bulk tumor expression data.

RecoverSE()
Recovery of SEs Using Pretrained NMF Models
DeconvoluteSE()
Infer SE Abundances Using a Pretrained NMF Model
NMFpredict()
Prediction Using Pretrained NMF Model

Validating Spatial Ecotypes

Validating spatial ecotypes in held-out single-cell or spatial transcriptomics data by testing the co-association or spatial autocorrelation of recovered SE-specific cell states.

Colocalization()
Evaluate Cell State Colocalization
Coassociation()
Compute co-association of cell states across samples
CoassociationTest()
Test Co-association Significance Between Cell States
ComputeNormalizedMoranI()
Compute Normalized Moran's I for Spatial Ecotypes
AverageMarkerExpression()
Compute average expression of gene sets across groups

Clustering Analysis

Clustering via NMF.

nmfClustering()
Robust Clustering via NMF (non-negative matrix factorization)

Visualization

SpatialView()
Visualize Spatial Landscape of Cells / Spots
HeatmapView()
Draw Heatmap
CooccurrenceHeatmapView()
Colocalization Heatmap Visualization
drawRectangleAnnotation()
Draw Rectangular Annotations for Matching Row/Column Groups in a Heatmap
getColors()
Generate a List of Colors

Data Processing

PreprocessST()
Preprocess Spatial Transcriptomics Data
AnnotateCells()
Extract Spatial Ecotype Annotations for Single Cells
Znorm()
Weighted / Unweighted Uni-variance Normalization
rankSparse()
Transform a Sparse Matrix to Rank Space (Rank Non-zeros in Each Column)
matrixMultiply()
Matrix Multiplication with Minibatching and Parallel Processing
fillspots()
Handle Missing Values
mostFrequent()
Identify the most frequent category in a vector
InferNCells()
Infer Cell Numbers per Spot from Expression Profiles