fitGAM {tradeSeq} | R Documentation |
This fits the NB-GAM model as described in Van den Berge et al.[2019]
fitGAM(counts, ...) ## S4 method for signature 'matrix' fitGAM(counts, sds = NULL, pseudotime = NULL, cellWeights = NULL, U = NULL, weights = NULL, offset = NULL, nknots = 6, verbose = TRUE, parallel = FALSE, BPPARAM = BiocParallel::bpparam(), control = mgcv::gam.control(), sce = FALSE, family = "nb")
counts |
the count matrix. |
... |
parameters including: |
sds |
an object of class |
pseudotime |
a matrix of pseudotime values, each row represents a cell and each column represents a lineage. |
cellWeights |
a matrix of cell weights defining the probability that a cell belongs to a particular lineage. Each row represents a cell and each column represents a lineage. |
U |
the design matrix of fixed effects. The design matrix should not contain an intercept to ensure identifiability. |
weights |
a matrix of weights with identical dimensions
as the |
offset |
the offset, on log-scale. If NULL, TMM is used to account for
differences in sequencing depth., see |
nknots |
Number of knots used to fit the GAM. Defaults to 6. |
verbose |
Logical, should progress be printed? |
parallel |
Logical, defaults to FALSE. Set to TRUE if you want to parallellize the fitting. |
BPPARAM |
object of class |
control |
Variables to control fitting of the GAM, see
|
sce |
Should output be of SingleCellExperiment class? This argument should not be changed by users. |
family |
The assumed distribution for the response, set to |
A list of length the number of genes
(number of rows of counts
). Each element of the list is either a
gamObject
if the fiting procedure converged, or an error
message.
set.seed(8) data(crv, package="tradeSeq") data(countMatrix, package="tradeSeq") gamList <- fitGAM(counts = as.matrix(countMatrix), sds = crv, nknots = 5)