as.PseudotimeOrdering: Conversion to PseudotimeOrdering

as.PseudotimeOrderingR Documentation

Conversion to PseudotimeOrdering

Description

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

Usage

as.PseudotimeOrdering(x, ...)

## S4 method for signature 'SlingshotDataSet'
as.PseudotimeOrdering(x)

## S4 method for signature 'SingleCellExperiment'
as.PseudotimeOrdering(x)

## S4 method for signature '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

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)


kstreet13/slingshot documentation built on April 6, 2023, 11:12 p.m.