| SpatialPCA-class | R Documentation |
Each SpatialPCA object has a number of slots which store information. Key slots to access are listed below.
countsThe raw expression count matrix. Rows are genes, columns are spots/cells.
normalized_exprNormalized (by default we use SCTransform normalization in Seurat R package) expression matrix.
projectName of the project (for record keeping).
covariateThe covariates in experiments (if any covariate included).
locationCell/spot spatial coordinates to compute the kernel matrix.
kernelmatThe kernel matrix for spatial relationship between locations.
kerneltypeThe type of kernel to be used, either "gaussian" for gaussian kernel, or "cauchy" for cauchy kernel, or "quadratic" for rational quadratic kernel.
bandwidthtypeThe 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).
bandwidthThe bandwidth in Gaussian kernel, users can also specify their preferred bandwidth.
sparseKernelTo 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_tolWhen 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_ncoreWhen sparseKernel=TRUE, sparseKernel_ncore is the number of CPU cores to use when building the sparse kernel matrix.
fastSelect "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.
eigenvecnumWhen 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.
tauThe variance parameter in covariance matrix for the spatial PCs, to be inferred through the algorithm.
sigma2_0The residual error variance, to be inferred through the algorithm.
SpatialPCnumThe number of Spatial PCs, specified by the user, default is 20.
WThe factor loading matrix.
SpatialPCsThe estimated spatial PCs.
highPCsThe estimated high resolution spatial PCs, if needed.
highPosThe scaled locations of estimated high resolution spatial PCs, if needed.
expr_predThe predicted gene expression on new locations when highPCs and highPos are avaliable.
paramsList of model parameters.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.