cellembedding_seurat | R Documentation |
This function computes cell embedding using the CAESAR framework with FAST for dimensionality reduction and spatial adjacency weights. It integrates variable feature selection and spatial adjacency information to generate low-dimensional representations for cells.
cellembedding_seurat(
seu,
adjm,
assay = NULL,
slot = "data",
nfeatures = 2000,
q = 50,
reduction.name = "caesar",
var.features = NULL,
...
)
seu |
A Seurat object. The Seurat object should contain gene expression data and be preprocessed with variable features identified. |
adjm |
A spatial adjacency matrix representing the relationships between cells or spots in spatial transcriptomic data. |
assay |
A character string specifying which assay to use from the Seurat object. If NULL, the function will use the default assay. |
slot |
The data slot to use for feature extraction (e.g., "data", "counts"). Default is "data". |
nfeatures |
The number of features to select for analysis. Default is 2000. |
q |
An integer specifying the number of dimensions for the reduced embeddings. Default is 50. |
reduction.name |
A character string specifying the name for the dimensional reduction. Default is "caesar". |
var.features |
A vector of variable features (genes) to use for the embedding. If NULL, the function will use variable features stored in the Seurat object. |
... |
Additional arguments passed to 'FAST_run'. |
The modified Seurat object with the co-embedding results (cell and gene embeddings) stored in the specified dimensional reduction slot.
FAST_run
for the main FAST dimensionality reduction algorithm.
data(toydata)
seu <- toydata$seu
pos <- toydata$pos
adjm <- ProFAST::AddAdj(as.matrix(pos), radius.upper = 200)
seu <- cellembedding_seurat(
seu = seu,
adjm = adjm
)
print(seu)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.