calculate_alignment_per_type: Calculate the alginment score

Description Usage Arguments Value

View source: R/evaluation_metrics.R

Description

Calculate the alginment score per cluster, where the normalization is performed based on the per-group batch population ratios

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
calculate_alignment_per_type(
  X,
  dataset = NULL,
  labels = NULL,
  k = NULL,
  max.k = 50,
  seed = 0,
  verbose = F,
  pca = F
)

Arguments

X

ncell-by-ngene expression matrix

dataset

factor/characteristic vector that indicate the batch of cells

labels

factor/characteristic vector, cluster/cell type labels of the cells

k

integer, number of nearest neighbor to consider

max.k

integer, maximum number of nearest neighbors to consider (cap for large dataset)

seed

random seed

verbose

boolean scalar, whether to show extensive program logs (default TRUE)

pca

if pca!=F, perform pca first before calculating the pairwise distance

Value

A list containing

alignment.per.sample

a numeric vector, alignment score per cell

alignment.per.cluster

a numeric vector, alignment score per cluster. Only calculated with labels are provided

alignment.per.dataset

a numeric vector, alignment score per dataset.

alignment.per.dataset.cluster

numeric vector, alignment score per dataset per cluster


pengminshi/cFIT documentation built on July 11, 2021, 11:12 p.m.