R/RcppExports.R

Defines functions calcGeoMeansDense calcNormFactorDense convertSparse calcGeoMeansSparse calcNormFactorSparse

Documented in calcGeoMeansDense calcGeoMeansSparse calcNormFactorDense calcNormFactorSparse convertSparse

# 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)
}
IMB-Computational-Genomics-Lab/ascend documentation built on Aug. 29, 2019, 4:10 a.m.