View source: R/SpatialPCA_multiple_sample.R
SpatialPCA_Multiple_Sample | R 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.
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
)
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. |
Returns SpatialPCA object with estimated Spatial PCs on locations.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.