Learn R Programming

slingshot (version 2.1.1)

slingPseudotime: Get Slingshot pseudotime values

Description

Extract the matrix of pseudotime values or cells' weights along each lineage.

Usage

slingPseudotime(x, ...)

slingCurveWeights(x, ...)

# S4 method for PseudotimeOrdering slingPseudotime(x, na = TRUE)

# S4 method for SingleCellExperiment slingPseudotime(x, na = TRUE)

# S4 method for SlingshotDataSet slingPseudotime(x, na = TRUE)

# S4 method for PseudotimeOrdering slingCurveWeights(x, as.probs = FALSE)

# S4 method for SingleCellExperiment slingCurveWeights(x)

# S4 method for SlingshotDataSet slingCurveWeights(x, as.probs = FALSE)

Arguments

x

an object containing slingshot output.

...

additional parameters to be passed to object-specific methods.

na

logical. If TRUE (default), cells that are not assigned to a lineage will have a pseudotime value of NA. Otherwise, their arclength along each curve will be returned.

as.probs

logical. If FALSE (default), output will be the weights used to construct the curves, appropriate for downstream analysis of individual lineages (ie. a cell shared between two lineages can have two weights of 1). If TRUE, output will be scaled to represent probabilistic assignment of cells to lineages (ie. a cell shared between two lineages will have two weights of 0.5).

Value

slingPseudotime: an n by L matrix representing each cell's pseudotime along each lineage.

slingCurveWeights: an n by L matrix of cell weights along each lineage.

Examples

Run this code
# NOT RUN {
data("slingshotExample")
rd <- slingshotExample$rd
cl <- slingshotExample$cl
pto <- slingshot(rd, cl, start.clus = '1')
slingPseudotime(pto)
slingCurveWeights(pto)
# }

Run the code above in your browser using DataLab