# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Calculate geometric means for dense matrices
#'
#' @param x A NumericMatrix
#' @return A vector of geometric means for each gene
#' @export
#'
calcGeoMeansDense <- function(x) {
.Call('_ascend_calcGeoMeansDense', PACKAGE = 'ascend', x)
}
#' Calculate size factors for dense matrices
#'
#'
#' @param x matrix
#' @param y geometric means
#' @return A numeric vector with sizeFactors for each cell
#' @export
calcNormFactorDense <- function(x, y) {
.Call('_ascend_calcNormFactorDense', PACKAGE = 'ascend', x, y)
}
#' Convert R sparse matrix to RcppArmadillo sparse matrix
#'
#' @param mat Sparse matrix object from R
#' @return Matrix in RcppArmadillo's sp_mat format
#' @export
#'
convertSparse <- function(mat) {
.Call('_ascend_convertSparse', PACKAGE = 'ascend', mat)
}
#' Calculate geometric means of sparse matrices
#'
#' @param sparseMatrix Sparse matrix from R
#' @return A numeric vector of geometric means
#' @export
#'
calcGeoMeansSparse <- function(sparseMatrix) {
.Call('_ascend_calcGeoMeansSparse', PACKAGE = 'ascend', sparseMatrix)
}
#' Calculate size factors from sparse matrices
#'
#' @param sparseMatrix A sparse matrix from R
#' @param geoMeans List of size factors
#' @return A numeric vector comprised of cell-specific size factors
#' @export
#'
calcNormFactorSparse <- function(sparseMatrix, geoMeans) {
.Call('_ascend_calcNormFactorSparse', PACKAGE = 'ascend', sparseMatrix, geoMeans)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.