Learn R Programming

coFAST (version 0.2.0)

AggregationScore: Calculate the aggregation score for specific clusters

Description

Calculate the adjacency matrix given a spatial coordinate matrix with 2-dimension or 3-dimension or more.

Usage

AggregationScore(seu, reduction.name = "cofast", random.seed = 1)

Value

return a data.frame with two columns: the first column is the number of spots in each category (cluster/cell type); the second column is the corresponding aggregation score.

Arguments

seu

a SeuratObject with reductions not NULL.

reduction.name

an character, specify the reduction name for calculating the aggregation score.

random.seed

a positive integer, specify the random seed for reproducibility.

References

None

See Also

None

Examples

Run this code
library(Seurat)
data(CosMx_subset)
CosMx_subset <- Addcoord2embed(CosMx_subset, coord.name = c("x", "y"))
Idents(CosMx_subset) <- 'cell_type'
# \donttest{
dat.sp.score <- AggregationScore(CosMx_subset, reduction.name = 'Spatial')
print(dat.sp.score)
# }

Run the code above in your browser using DataLab