calcknncorr: Calculates the k-NN correlation, which measures how well the...

View source: R/knncorr.R

calcknncorrR Documentation

Calculates the k-NN correlation, which measures how well the sorted ordering of k nearest reference neighbors in a gold standard embedding correlate with the ordering for the same reference cells in an alternative embedding (i.e. from reference mapping). NOTE: it is very important for the order of reference cells (cols) in gold_ref matches that of alt_ref (same for matching columns of gold_query and alt_query).

Description

Calculates the k-NN correlation, which measures how well the sorted ordering of k nearest reference neighbors in a gold standard embedding correlate with the ordering for the same reference cells in an alternative embedding (i.e. from reference mapping). NOTE: it is very important for the order of reference cells (cols) in gold_ref matches that of alt_ref (same for matching columns of gold_query and alt_query).

Usage

calcknncorr(gold_ref, alt_ref, gold_query, alt_query, k = 500)

Arguments

gold_ref

Reference cells in gold standard embedding (PCs by cells)

alt_ref

Reference cells in alternative embedding (PCs by cells)

gold_query

Query cells in gold standard embedding (PCs by cells)

alt_query

Query cells in alternative embedding (PCs by cells)

k

Number of reference neighbors to use for kNN-correlation calculation

Value

Vector of k-NN correlations for query cells


symphony documentation built on Jan. 17, 2023, 1:13 a.m.