count: A reordered count matrix. If the cells are already grouped, the function returns NULL.
id: A reordered subject ID vector.
pred: A reordered design matrix of the predictors.
offset: A reordered vector of the scaling factor.
Arguments
count
A raw count matrix of the single-cell data. The rows are the genes, and the columns are the cells. The matrix can be a matrix object or a sparse dgCMatrix object.
id
A vector of subject IDs. The length should be the same as the number of columns of the count matrix.
pred
A design matrix of the predictors. The rows are the cells and the columns are the predictors. If not specified, an intercept column will be generated by default.
offset
A vector of the scaling factor. The values must be strictly positive. If not specified, a vector of all ones will be generated by default.