checkDataDistribution: fit different count models for a data matrix

Description Usage Arguments Value Examples

View source: R/checkGeneCountDistribution.R

Description

This function fits the count with different count models including Poisson, negative binomial and zero inflated negative binomial models. It invokes checkCountDistributionPerGroup for the real fitting

Usage

1
2
checkDataDistribution(data, groups, countPerCell = NULL,
  covariates = NULL, largestKRemoved = 0, ncore = 1)

Arguments

data

the gene-cell data matrix, it assumes the row names of the matrix are the gene names

groups

the group ID vector. If there are multiple groups, the results will be put together with cbind

countPerCell

the total UMI per cell. If it is NULL, it is calculated by summing over all the gene counts for each cell.

covariates

the covariates to account for

largestKRemoved

remove the numbers correspond to the largest K

ncore

the number of cores to use for parallel running

Value

a data frame with fitted information

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
gene1 = rnbinom(100, size = 0.1, mu = 0.1)
gene2 = rpois(100, lambda = 0.1)
data = rbind(gene1, gene2)
groups = rep(1, 100)
countPerCell = rep(1e4, 100)
fitResult = checkDataDistribution(data, groups, countPerCell)
print(t(fitResult))

## End(Not run)

chenlab-sj/nbid documentation built on Nov. 4, 2019, 8:50 a.m.