Description Usage Arguments Details Value Examples
This fits the NBGAM model as described in
Van den Berge et al.[2019].
There are two ways to provide the required input in fitGAM
.
See Details and the vignette.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77  fitGAM(counts, ...)
## S4 method for signature 'matrix'
fitGAM(
counts,
sds = NULL,
pseudotime = NULL,
cellWeights = NULL,
conditions = NULL,
U = NULL,
genes = seq_len(nrow(counts)),
weights = NULL,
offset = NULL,
nknots = 6,
verbose = TRUE,
parallel = FALSE,
BPPARAM = BiocParallel::bpparam(),
control = mgcv::gam.control(),
sce = TRUE,
family = "nb",
gcv = FALSE
)
## S4 method for signature 'dgCMatrix'
fitGAM(
counts,
sds = NULL,
pseudotime = NULL,
cellWeights = NULL,
U = NULL,
genes = seq_len(nrow(counts)),
weights = NULL,
offset = NULL,
nknots = 6,
verbose = TRUE,
parallel = FALSE,
BPPARAM = BiocParallel::bpparam(),
control = mgcv::gam.control(),
sce = TRUE,
family = "nb",
gcv = FALSE
)
## S4 method for signature 'SingleCellExperiment'
fitGAM(
counts,
U = NULL,
genes = seq_len(nrow(counts)),
conditions = NULL,
weights = NULL,
offset = NULL,
nknots = 6,
verbose = TRUE,
parallel = FALSE,
BPPARAM = BiocParallel::bpparam(),
control = mgcv::gam.control(),
sce = TRUE,
family = "nb",
gcv = FALSE
)
## S4 method for signature 'CellDataSet'
fitGAM(
counts,
U = NULL,
genes = seq_len(nrow(counts)),
weights = NULL,
offset = NULL,
nknots = 6,
verbose = TRUE,
parallel = FALSE,
BPPARAM = BiocParallel::bpparam(),
control = mgcv::gam.control(),
sce = TRUE,
family = "nb",
gcv = FALSE
)

counts 
The count matrix of expression values, with genes in rows and cells in columns. Can be a matrix or a sparse 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. If only a single lineage, provide a matrix with one column containing all values of 1. 
conditions 
This argument is in beta phase and should be used carefully. If each lineage consists of multiple conditions, this argument can be used to specify the conditions. tradeSeq will then fit a conditionspecific smoother for every lineage. 
U 
The design matrix of fixed effects. The design matrix should not contain an intercept to ensure identifiability. 
genes 
The genes on which to run 
weights 
A matrix of weights with identical dimensions
as the 
offset 
The offset, on logscale. 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. It is recommended to use the 'evaluateK' function to guide in selecting an appropriate number of knots. 
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 
Logical: should output be of SingleCellExperiment class? This is
recommended to be TRUE. If 
family 
The assumed distribution for the response. Is set to 
gcv 
(In development). Logical, should a GCV score also be returned? 
fitGAM
supports four different ways to input the required objects:
"Count matrix, matrix of pseudotime and matrix of cellWeights."
Input count matrix using counts
argument and
pseudotimes and cellWeights as a matrix, with number of rows equal to
number of cells, and number of columns equal to number of lineages.
"Count matrix and Slingshot input."Input count matrix using
counts
argument and Slingshot object using sds
argument.
"SingleCellExperiment Object after running slingshot on the object."
Input SingleCellExperiment Object using counts
argument.
"CellDataSet object after running the orderCells
function."
Input CellDataSet Object using counts
argument.
If sce=FALSE
, returns a list of length equal to 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.
If sce=TRUE
, returns a singleCellExperiment
object with
the tradeSeq
results stored in the rowData
,
colData
and metadata
.
1 2 3 4 5 6 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.