Perform trajectory-based differential expression analysis using negative binomial regression. This function tests for genes that change expression along a continuous trajectory variable.
TrajDETest(object, ...)
# Default S3 method
TrajDETest(
object,
traj.var = NULL,
latent.vars = NULL,
features = NULL,
fc.results = NULL,
verbose = TRUE,
...
)
# S3 method for class 'Assay'
TrajDETest(
object,
layer = "counts",
traj.var = NULL,
latent.vars = NULL,
samples = NULL,
features = NULL,
logfc.threshold = 0,
prob.break.point = c(1/3, 2/3),
min.pct = 0.1,
min.count = 10,
pseudocount.use = 1,
verbose = TRUE,
...
)
# S3 method for class 'StdAssay'
TrajDETest(
object,
layer = "counts",
traj.var = NULL,
latent.vars = NULL,
samples = NULL,
features = NULL,
logfc.threshold = 0,
prob.break.point = c(1/3, 2/3),
min.pct = 0.1,
min.count = 10,
pseudocount.use = 1,
verbose = TRUE,
...
)
# S3 method for class 'Seurat'
TrajDETest(
object,
assay = NULL,
layer = "counts",
traj.var = NULL,
latent.vars = NULL,
samples = NULL,
features = NULL,
logfc.threshold = 0,
prob.break.point = c(1/3, 2/3),
min.pct = 0.1,
min.count = 10,
pseudocount.use = 1,
complete.results = FALSE,
verbose = TRUE,
...
)Expression data matrix, Assay, StdAssay, or Seurat object
additional parameters to be passed to glmGamPoi::glm_gp or filterByExpr
For the Seurat method: a single character string naming a column in the object metadata. For the Assay/default methods: a data frame (one column) containing the trajectory variable of the samples to be tested against.
a data frame containing the latent variables (e.g., covariates that might affect the gene expression) to include in regression.
Genes to test. Default is to use all genes (after QC)
fc.results calculated by FoldChange(); if not null QC will be performed based on this
Print a progress bar once expression testing begins
the data layer to be used for trajectory DE test. Currently only 'counts' is supported.
the cells/samples to be included in the DE test
Limit testing to genes which show, on average, at least X-fold difference (log-scale) between the top and bottom groups of samples (see prob.break.point for details). Default is 0 (i.e., no filtering).
a numeric vector of probability break points with values in (0, 1). It will be used to calculate 2 quantiles along the trajectory and to calculate the logfc.
only test genes that are detected in a minimum proportion of cells (passed as
min.prop to the internal filterByExpr() filter). Default is 0.1.
Minimum count threshold for gene filtering
Pseudocount to add to averaged expression values when calculating logFC. 1 by default.
the assay to be used (for Seurat objects)
Whether to return complete results or summary
A data frame with differential expression results
if (FALSE) { # \dontrun{
# Run trajectory DE test on a Seurat object
de_results <- TrajDETest(seurat_obj, traj.var = "pseudotime")
} # }