Learn R Programming

slingshot (version 2.1.1)

SlingshotDataSet: Extract Slingshot output

Description

This is a convenience function to extract a SlingshotDataSet from an object containing slingshot output. However, we now recommend using a PseudotimeOrdering object, in most cases. The SlingshotDataSet is, however, still used for plotting purposes.

Usage

SlingshotDataSet(data, ...)

# S4 method for SingleCellExperiment SlingshotDataSet(data)

# S4 method for SlingshotDataSet SlingshotDataSet(data)

# S4 method for PseudotimeOrdering SlingshotDataSet(data)

Arguments

data

an object containing slingshot output.

...

additional arguments to pass to object-specific methods.

Value

A SlingshotDataSet object containing the output of slingshot.

See Also

PseudotimeOrdering, as.SlingshotDataSet

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')
SlingshotDataSet(sce)

# }

Run the code above in your browser using DataLab