Description Usage Arguments Details Value Examples
This determines the slope and inflection point of the logistic function used to bias the transition probabilities, based on the pseudotimes of cells in the data.
1 2 3 4 5 6 7 8 9 | pseudotimeDetermineLogistic(
object,
pseudotime,
optimal.cells.forward,
max.cells.back,
pseudotime.direction = "<",
do.plot = T,
print.values = T
)
|
object |
An URD object |
pseudotime |
(Character) Name of pseudotime to use for biasing (i.e. a column name of |
optimal.cells.forward |
(Numeric) The number of cells in the direction specified by |
max.cells.back |
(Numeric) The number of cells in the direction opposite from that specified by |
pseudotime.direction |
(Character: "<" or ">") Which direction to bias the transition probabilities ( |
do.plot |
(Logical) Should the logistic function be plotted? |
print.values |
(Logical) Should the values determined for the logistic be printed? |
For determining the developmental trajectories, it is critical to ensure that when walks reach a
branchpoint in the data, they continue toward the root, rather than turning down the path toward
a different differentiated population. Thus, we convert the undirected graph defined by the
transition probabilities into a directed graph where transitions are much more likely to
earlier or equally pseudotimed cells than to later pseudotimed cells (which would
correspond to a different, more differentiated branch). To do this, we biased the
transition probabilities between each pair of cells by multiplying the original
transition probabilities with a factor that ranges from 0 to 1. These factors are
obtained by transforming the difference in pseudotime between the two cells with
a logistic function. This function uses the average difference in pseudotime
between cells that are optimal.cells.forward
and max.cells.back
apart (when all cells in the data are ranked according to pseudotime) to determine
k
and x0
for the logistic function.
A list: Logistic parameters to use in pseudotimeWeightTransitionMatrix
.
1 2 3 4 5 6 7 8 9 10 11 | # Determine parameters of logistic function
diffusion.logistic <- pseudotimeDetermineLogistic(object, "pseudotime", optimal.cells.forward = 40, max.cells.back = 80, pseudotime.direction = "<", do.plot = T, print.values = T)
# Generate biased transition matrix
biased.tm <- pseudotimeWeightTransitionMatrix(object, pseudotime = "pseudotime", logistic.params = diffusion.logistic, pseudotime.direction = "<")
# Simulate random walks
these.walks <- simulateRandomWalk(start.cells = tip.10.cells, transition.matrix = biased.tm, end.cells = root.cells, n = 50000, end.visits = 1, verbose.freq = 2500, max.steps = 5000)
# Process walks into visitation frequency
object <- processRandomWalks(object, walks = these.walks, walks.name = "10", verbose = F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.