Description Usage Arguments Value Examples
This takes a group of genes and cells, averages gene expression in groups of cells (determined using a moving window through pseudotime), and then uses smoothing algorithms (e.g. LOESS or spline fitting) to describe the expression of each gene. The results are returned for use in plotSmoothFit
to visualize the fits or several sets of results (e.g. from different trajectories) can be combined with cropSmoothFit
and plotted with plotSmoothFitMultiCascade
.
1 2 3 4 5 6 7 8 9 10 11 12 13 | geneSmoothFit(
object,
pseudotime,
cells,
genes,
method = c("lowess", "spline"),
moving.window = 3,
cells.per.window = NULL,
pseudotime.per.window = NULL,
verbose = T,
verbose.genes = F,
...
)
|
object |
An URD object |
pseudotime |
(Character) Name of pseudotime (i.e. a column name of |
cells |
(Character vector) Cells to include |
genes |
(Character vector) Genes to include |
method |
(Character) Which smoothing method to use ("lowess" calls |
moving.window |
(Numeric) Number of bins to use per window |
cells.per.window |
(Numeric or |
pseudotime.per.window |
(Numeric or |
verbose |
(Logical) Display progress reports? |
verbose.genes |
(Logical) Display a message when starting each gene? |
(Named List):
pt.windows
: (List) Character vectors of cell IDs of cells in each window, named by either the mean, min, or max pseudotime of those cells (depending on name.by
)
mean.expression
: (data.frame) Mean expression of each gene in each pseudotime window
scaled.expression
: (data.frame) Mean expression of each gene in each pseudotime window, scaled to the maximum observed expression
mean.smooth
: (data.frame) Value of fit curve for each pseudotime window (i.e. to predict value of mean.expression)
scaled.smooth
: (data.frame) Value of fit curve for each pseudotime window, scaled to max expression (i.e. to predict value of scaled.expression)
mean.expression.red
: (data.frame) Mean expression reduced to the same dimensions of mean.smooth
. (When method is 'spline' if two windows have the same pseudotime, only a single prediction is made for that pseudotime, so this will average the two input windows.)
scaled.expression.red
: (data.frame) Scaled expression reduced to the same dimensions of scaled.smooth
.
method
: (Character) Identify fit method ("impulse")
1 2 3 4 5 6 7 | # Fit a gene expression curve using "spline" method for
# genes "endo.genes" and cells in segments 47 and 46 in the tree.
tentacle.spline <- geneSmoothFit(urd.object, method = "spline",
pseudotime = "pseudotime",
cells = cellsInCluster(urd.object, "segment", c("47", "46")),
genes = endo.genes, moving.window = 1, cells.per.window = 5, spar = 0.9
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.