calculate_alignment: Calculate the alginment score

Description Usage Arguments Value

View source: R/evaluation_metrics.R

Description

Calculate the alginment score per sample, per cluster and per dataset

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
calculate_alignment(
  X.list,
  k = NULL,
  balanced = F,
  min.sample.per.dataset = 100,
  dataset = NULL,
  labels = NULL,
  max.k = 50,
  seed = 0,
  verbose = F,
  pca = F
)

Arguments

X.list

a list of gene expression matrix per batch

k

integer, number of nearest neighbor to consider

balanced

boolean, whether to subset to balance the size of baches

min.sample.per.dataset

integer, minimum cells to sample per dataset (default 100)

dataset

factor/characteristic vector that indicate the batch of cells if len(X.list)==1

labels

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

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.


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