calculate_within_batch_ari: Calculate within-batch ARI scores from a merged SCE object.

View source: R/calculate_within_batch_ari.R

calculate_within_batch_ariR Documentation

Calculate within-batch ARI scores from a merged SCE object.

Description

Calculate within-batch ARI scores from a merged SCE object.

Usage

calculate_within_batch_ari(
  individual_sce_list,
  pc_names,
  merged_sce,
  batch_column = "library_id",
  cell_id_column = "cell_id",
  BLUSPARAM = bluster::NNGraphParam(cluster.fun = "louvain", type = "jaccard"),
  seed = NULL,
  ...
)

Arguments

individual_sce_list

A named list of individual SCE objects. It is assumed these have a reduced dimension slot with principal components named "PCA". Column names of each object should match the contents of the 'cell_id_column' for the 'merged_sce.'

pc_names

A list of names of the PCs in the merged SCE 'reducedDim' slot object. Example: c("PCA", "fastMNN_PCA"). A within-batch ARI will be returned for each 'pc_name'.

merged_sce

The merged SCE object containing data from multiple batches

batch_column

The variable in 'merged_sce' indicating the grouping of interest. Generally this is either batches or cell types. Default is "library_id".

cell_id_column

The variable in 'merged_sce' indicating the original cell barcode. Default is "cell_id".

BLUSPARAM

A BlusterParam object specifying the clustering algorithm to use and any additional clustering options. Default is 'bluster::NNGraphParam(cluster.fun = "louvain", type = "jaccard")'

seed

Seed for initializing random sampling

...

Additional arguments to provide to 'bluster::clusterRows()' within 'cluster_sce()'

Value

Tibble with three columns: 'ari', representing the calculated ARI values; 'batch_id', the batch id associated with each 'ari'; 'pc_name', the name associated with the pc results


AlexsLemonade/scpcaTools documentation built on July 12, 2024, 8:34 a.m.