Calculate statistics for evaluating batch correction

computeClusterEvalStats(
  spe_object,
  foiColumn,
  precomputed = NULL,
  n_dimension = c(1, 2),
  assay = 2
)

Arguments

spe_object

A Spatial Experiment object.

foiColumn

A column name indicating the factor of interest to be tested, can be biological factor or batch factor.

precomputed

a dimensional reduction results from stats::prcomp. result in reducedDims(object) to plot. Default is NULL, we will compute for you.

n_dimension

The top n dimensions to be plotted

assay

a numeric or character, specifying the assay to use (for SummarizedExperiment and its derivative classes).

Value

A dataframe object containing the clustering evaluating statistics.

Examples

library(scater)
#> Loading required package: scuttle
#> Loading required package: ggplot2
#> 
#> Attaching package: ‘scater’
#> The following object is masked from ‘package:standR’:
#> 
#>     plotMDS
data("dkd_spe_subset")
computeClusterEvalStats(dkd_spe_subset, "SlideName")
#>                         types              scores
#> 1         Adjusted Rand Index   0.187771321257978
#> 2     Chi-Squared Coefficient    96.9654582844533
#> 3               Jaccard Index   0.186520376175549
#> 4 Simple Matching Coefficient                1038
#> 5             Mirkin Distance   0.785093167701863
#> 6      Silhouette Coefficient -0.0699498050966789