getReductionCentroids | R Documentation |
Utility function to calculate the physical xy coordinates of each seurat
cluster based on a dimensional reduction already present in the object.
The results are returned in a list with the length of the number of distinct
seurat clusters based on the seurat_obj meta.data
.
getReductionCentroids(seurat_obj, reduction)
seurat_obj |
input seurat object with the dimensional reduction of choice already present, and seurat clusters computed. |
reduction |
character. The reduction that the centroid calculation should be based on. |
A list of the length of the number of distinct clusters in the seurat object metadata, where each element of the list is a numeric vector of length 2, with the numbers corresponding to the x and y coordinate respectively of the seurat cluster with the corresponding index.
data("combined_pbmc")
getReductionCentroids(combined_pbmc, reduction = "umap")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.