SpatialPCA_Multiple_Sample: Multiple sample SpatialPCA. In this extension, we construct...

View source: R/SpatialPCA_multiple_sample.R

SpatialPCA_Multiple_SampleR Documentation

Multiple sample SpatialPCA. In this extension, we construct the covariance matrix for the latent factors in the form of a block diagonal matrix: it consists of the kernel matrices constructed using the spatial location information within each dataset, with zero correlation for pairs of locations across datasets. This way, the latent factors within each dataset are correlated a priori across spatial locations, while the latent factors across datasets are not correlated a priori. Certainly, if one wants to model the a priori correlation between latent factors across datasets, due to, for example, their similarity in the features extracted from histology images, then one can also modify the kernel matrices by constructing them using features other than spatial location information.

Description

Multiple sample SpatialPCA. In this extension, we construct the covariance matrix for the latent factors in the form of a block diagonal matrix: it consists of the kernel matrices constructed using the spatial location information within each dataset, with zero correlation for pairs of locations across datasets. This way, the latent factors within each dataset are correlated a priori across spatial locations, while the latent factors across datasets are not correlated a priori. Certainly, if one wants to model the a priori correlation between latent factors across datasets, due to, for example, their similarity in the features extracted from histology images, then one can also modify the kernel matrices by constructing them using features other than spatial location information.

Usage

SpatialPCA_Multiple_Sample(
  count_list,
  location_list,
  gene.type = "spatial",
  sparkversion = "spark",
  numCores_spark = 5,
  gene.number = 3000,
  customGenelist = NULL,
  min.loctions = 20,
  min.features = 20,
  bandwidth_common = 0.1
)

Arguments

count_list

A list of g by n count matrix, g is gene number, n is location number.

location_list

A list of n by d location matrix, n is location number, d is location dimension. The rownames of each location matrix should match with the colnames of its corresponding count matrix.

Value

Returns SpatialPCA object with estimated Spatial PCs on locations.


shangll123/SpatialPCA documentation built on April 17, 2024, 3:15 a.m.