This function is used to fit genes with GLM

fit_models(
  counts,
  cexpr,
  lib.size,
  formula = NULL,
  workers = NULL,
  seed = NULL,
  model = NULL
)

Arguments

counts

A non-negative integer matrix of scRNA-seq filtered read counts containing genes belonging to the family of ZINB distributions selected from ks_test.

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.

workers

Number of workers to be used in parallel computation using future.apply, with argument multisession.

seed

Seed number to be used in parallel computation using future.apply, with argument multisession

model

A specific model to fit (1:P, 2:NB, 3:ZIP, 4:ZINB, NULL:All)

Value

A list of models fitted by 'glm'