Learn R Programming

slingshot (version 2.1.1)

as.PseudotimeOrdering: Conversion to PseudotimeOrdering

Description

This function converts objects that contain slingshot results into a PseudotimeOrdering.

Usage

as.PseudotimeOrdering(x, ...)

# S4 method for SlingshotDataSet as.PseudotimeOrdering(x)

# S4 method for SingleCellExperiment as.PseudotimeOrdering(x)

# S4 method for PseudotimeOrdering as.PseudotimeOrdering(x)

Arguments

x

an object containing slingshot output.

...

additional arguments to pass to object-specific methods.

Value

A PseudotimeOrdering object containing the slingshot results from the original object, x.

Examples

Run this code
# NOT RUN {
data("slingshotExample")
rd <- slingshotExample$rd
cl <- slingshotExample$cl
library(SingleCellExperiment)
u <- matrix(rpois(140*50, 5), nrow = 50)
sce <- SingleCellExperiment(assays = list(counts = u), 
                            reducedDims = SimpleList(PCA = rd),
                            colData = data.frame(clus = cl))
sce <- slingshot(sce, clusterLabels = 'clus', reducedDim = 'PCA')
as.PseudotimeOrdering(sce)

# }

Run the code above in your browser using DataLab