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.
calcknncorrWithinQuery(
query,
var = NULL,
k = 100,
topn = 2000,
d = 20,
distance = "euclidean"
)Vector of within-query k-NN correlations for query cells
Query object (returned from mapQuery)
Query metadata batch variable (PCA is calculated within each batch separately); if NULL, do not split by batch
Number of neighbors to use for kNN-correlation calculation
number of variable genes to calculate within each query batch for query PCA
number of dimensions for query PCA within each query batch
either 'euclidean' or 'cosine'