ks_test: ks_test

View source: R/ks_test.R

ks_testR Documentation

ks_test

Description

This function is used to perform Kolmogorv-Smirnov test on the filtered sparse counts matrix from filter_counts to select genes belonging to the family of ZINB distributions

Usage

ks_test(counts, cexpr, lib.size, formula = NULL, BPPARAM)

Arguments

counts

A non-negative integer matrix of scRNA-seq filtered read counts from filter_counts. The rows of the matrix are genes and columns are samples/cells.

cexpr

A dataframe that contains the covariate values. The rows of the dataframe are the corresponding samples/cells from the counts matrix from filter_counts. The cells of the dataframe are the covariates to be included in the GLM.

lib.size

A numeric vector that contains the total number of counts per cell from the counts matrix from filter_counts.

formula

A regression formula to fit the covariates in the ZINB GLM.

BPPARAM

configuration parameter related to the method of parallel execution. For further information on how to set-up parallel execution refer to BiocParallel vignette.

Value

List object containing the p-values from the KS test.

Examples


#' # load toy  example data

data(scData)

# apply the ks_test function to subset genes belonging to the
# family of ZINB distributions.

library(BiocParallel)
scData_KS <- ks_test(counts=scData$counts, cexpr=scData$covariates, lib.size=scData$lib_size, BPPARAM=bpparam())

Malindrie/scShapes documentation built on Nov. 21, 2022, 8:58 a.m.