calcknncorrWithinQuery: Calculates the k-NN correlation within the query cells only,...

View source: R/knncorr.R

calcknncorrWithinQueryR Documentation

Calculates the k-NN correlation within the query cells only, which measures how well the sorted ordering of k nearest query neighbors in a query de novo PCA embedding correlate with the ordering for the cells in the reference mapping embedding.

Description

Calculates the k-NN correlation within the query cells only, which measures how well the sorted ordering of k nearest query neighbors in a query de novo PCA embedding correlate with the ordering for the cells in the reference mapping embedding.

Usage

calcknncorrWithinQuery(
  query,
  var = NULL,
  k = 100,
  topn = 2000,
  d = 20,
  distance = "euclidean"
)

Arguments

query

Query object (returned from mapQuery)

var

Query metadata batch variable (PCA is calculated within each batch separately); if NULL, do not split by batch

k

Number of neighbors to use for kNN-correlation calculation

topn

number of variable genes to calculate within each query batch for query PCA

d

number of dimensions for query PCA within each query batch

distance

either 'euclidean' or 'cosine'

Value

Vector of within-query k-NN correlations for query cells


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