SpatialPCA-class: Each SpatialPCA object has a number of slots which store...

SpatialPCA-classR Documentation

Each SpatialPCA object has a number of slots which store information. Key slots to access are listed below.

Description

Each SpatialPCA object has a number of slots which store information. Key slots to access are listed below.

Slots

counts

The raw expression count matrix. Rows are genes, columns are spots/cells.

normalized_expr

Normalized (by default we use SCTransform normalization in Seurat R package) expression matrix.

project

Name of the project (for record keeping).

covariate

The covariates in experiments (if any covariate included).

location

Cell/spot spatial coordinates to compute the kernel matrix.

kernelmat

The kernel matrix for spatial relationship between locations.

kerneltype

The type of kernel to be used, either "gaussian" for gaussian kernel, or "cauchy" for cauchy kernel, or "quadratic" for rational quadratic kernel.

bandwidthtype

The type of bandwidth to be used in Gaussian kernel, "SJ" for Sheather & Jones (1991) method (usually used in small sample size datasets), "Silverman" for Silverman's ‘rule of thumb’ method (1986)(usually used in large sample size datasets).

bandwidth

The bandwidth in Gaussian kernel, users can also specify their preferred bandwidth.

sparseKernel

To choose if the user wants to use a sparse kernel matrix or not. It is recommended to choose sparseKernel="TRUE" when sample size is large and you want to speed up the calculation.

sparseKernel_tol

When sparseKernel=TRUE, sparseKernel_tol is the cut-off value when building sparse kernel matrix, any element in the kernel matrix greater than sparseKernel_tol will be kept, otherwise will be set to 0 to save memory.

sparseKernel_ncore

When sparseKernel=TRUE, sparseKernel_ncore is the number of CPU cores to use when building the sparse kernel matrix.

fast

Select "TRUE" to accrelerate the algorithm by performing low-rank approximation on the kernel matrix, otherwise "FALSE" for calculation without low-rank approximation on the kernel matrix.

eigenvecnum

When fast=TRUE, the user can optionally specify the number of top eigenvectors and eigenvalues to be used in low-rank approximation when performing eigen decomposition on the kernel matrix.

tau

The variance parameter in covariance matrix for the spatial PCs, to be inferred through the algorithm.

sigma2_0

The residual error variance, to be inferred through the algorithm.

SpatialPCnum

The number of Spatial PCs, specified by the user, default is 20.

W

The factor loading matrix.

SpatialPCs

The estimated spatial PCs.

highPCs

The estimated high resolution spatial PCs, if needed.

highPos

The scaled locations of estimated high resolution spatial PCs, if needed.

expr_pred

The predicted gene expression on new locations when highPCs and highPos are avaliable.

params

List of model parameters.


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