tipPotential: Find tip potential

Description Usage Arguments Details Value

View source: R/flood.R

Description

This finds the neighbors in gene expression space within a given range, and calculates the proportion of those neighbors that have earlier pseudotimes.

Usage

1
2
3
4
5
6
7
8
9
tipPotential(
  object,
  pseudotime,
  range.function = prop.nonexp,
  genes.use = object@var.genes,
  nn.dist.range = c(20, 22),
  pseudotime.name = "tip.potential",
  cell.dist = NULL
)

Arguments

object

An URD object

pseudotime

(Character) The column name of a previously calculated pseudotime

range.function

(Function) The function used to summarize the delta pseudotimes for each cell (default is the proportion <= 0, but mean and other options can also work here)

genes.use

(Character vector) Which genes to use for calculating the distance between cells. (Default is variable genes)

nn.dist.range

(Numeric vector, length 2) The range of nearest neighbor distances to consider.

pseudotime.name

(Character) Output as saved in @pseudotime under this column name.

cell.dist

(Matrix) Distance between cells (see cellDistByExpression; if NULL, will be calculated automatically.)

Details

In samples that were not a time-course, the length of branches in pseudotime won't be constant, but will instead represent the relative differences in gene expression from the progentior stem cells to the final differentiated fates. Thus, rather than using pseudotime directly, this calculates whether cells' neighborhoods are asymmetric, such that most cells in their neighborhood have earlier pseudotimes, which indicates that they have a high likelihood of being tips.

In large data sets, it can be slow to calculate the distance between cells, and may be worth calculating in advance with cellDistByExpression so that multiple parameters for nn.dist.range can be explored without needing to recalculate.

Value

An URD object with @pseudotime$pseudotime.name set to the potential for cells to be part of a tip.


farrellja/URD documentation built on June 17, 2020, 4:48 a.m.