Skip to contents

Integrate Multiple Spatial Transcriptomics Datasets to Identify Conserved Spatial Ecotypes

Usage

IntegrateSpatialEcoTyper(
  SpatialEcoTyper_list,
  data_list,
  outdir = "./",
  normalization.method = "None",
  nmf_ranks = 10,
  nrun.per.rank = 30,
  min.coph = 0.95,
  nfeatures = 3000,
  min.features = 10,
  Region = NULL,
  subresolution = 30,
  minibatch = 5000,
  ncores = 1,
  seed = 1
)

Arguments

SpatialEcoTyper_list

A named list of SpatialEcoTyper results, each item represents a list returned from the SpatialEcoTyper function.

data_list

A named list of expression matrices where each matrix represents gene expression data used for the SpatialEcoTyper analysis. The list name should match that of SpatialEcoTyper_list.

outdir

Directory where the results will be saved. Defaults to the current directory with a subdirectory named "SpatialEcoTyper_results_" followed by the current date.

normalization.method

Method for normalizing the expression data. Options include "None" (default), "SCT", or other methods compatible with Seurat's `NormalizeData` function.

nmf_ranks

Integer or a vector specifying the number of clusters (10 by default). When an integer vector is supplied, the function will test all supplied numbers and select the optimal number, which takes time.

nrun.per.rank

An integer specifying the the number of runs per rank for NMF (default: 30).

min.coph

Numeric specifying the minimum cophenetic coefficient required for a rank to be optimal.

nfeatures

An integer specifying the maximum number of top variable genes to select for each cell type.

min.features

An integer specifying the minimum number of shared features (genes) required across samples.

Region

A character string specifying the column name in metadata data frames containing region annotations (default: NULL). Pathologist annotation is recommended if available.

subresolution

A numeric specifying the resolution for clustering within each sample.

minibatch

Integer specifying the number of columns to process in each minibatch in the SNF analysis. Default is 5000. This option splits the matrix into smaller chunks (minibatch), thus reducing memory usage.

ncores

An integer specifying the number of cores for parallel processing. Default is 1.

seed

An integer used to seed the random number generator for NMF analysis.

Examples

# See https://digitalcytometry.github.io/spatialecotyper/docs/articles/Integration.html