Learn R Programming

slingshot (version 2.1.1)

slingMST: Extract Slingshot minimum spanning tree

Description

Extract the minimum spanning tree from an object containing slingshot output.

Usage

slingMST(x, ...)

# S4 method for PseudotimeOrdering slingMST(x, as.df = FALSE)

# S4 method for SingleCellExperiment slingMST(x, ...)

# S4 method for SlingshotDataSet slingMST(x, as.df = FALSE)

Arguments

x

an object containing slingshot output.

...

additional parameters to be passed to object-specific methods.

as.df

logical, whether to format the output as a data.frame, suitable for plotting with ggplot.

Value

In most cases, output is an igraph object representing the MST. If x is a SlingshotDataSet, then output is an adjacency matrix representing the MST.

Examples

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

Run the code above in your browser using DataLab