R/RcppExports.R

Defines functions getRank countPairs compute_simpson_index

Documented in compute_simpson_index

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Compute the Local Inverse Simpson Index (LISI)
#'
#' @param D Distance matrix of K nearest neighbors.
#' @param knn_idx Adjacency matrix of K nearest neighbors.
#' @param batch_labels A categorical variable.
#' @param n_batches The number of categories in the categorical variable.
#' @param perplexity The effective number of neighbors around each cell.
#' @param tol Stop when the score converges to this tolerance.
compute_simpson_index <- function(D, knn_idx, batch_labels, n_batches, perplexity = 15, tol = 1e-5) {
    .Call(`_scPOP_compute_simpson_index`, D, knn_idx, batch_labels, n_batches, perplexity, tol)
}

countPairs <- function(classi1, classi2, order) {
    .Call(`_scPOP_countPairs`, classi1, classi2, order)
}

getRank <- function(classi) {
    .Call(`_scPOP_getRank`, classi)
}

Try the scPOP package in your browser

Any scripts or data that you put into this service are public.

scPOP documentation built on Aug. 4, 2021, 5:06 p.m.