SlingshotDataSet-class {slingshot}R Documentation

Class SlingshotDataSet

Description

The SlingshotDataSet class holds data relevant for performing lineage inference with the slingshot package, primarily a reduced dimensional representation of the data and a set of cluster labels. All slingshot methods can take an object of the class SlingshotDataSet as input and will output the same.

Extract cluster labels, either a character vector or matrix of weights.

Usage

## S4 method for signature 'SlingshotDataSet'
show(object)

## S4 method for signature 'SlingshotDataSet'
reducedDim(x)

## S4 method for signature 'SlingshotDataSet'
reducedDims(x)

## S4 method for signature 'SlingshotDataSet'
clusterLabels(x)

## S4 method for signature 'SlingshotDataSet,ANY,ANY,ANY'
x[i, j]

Arguments

object

a SlingshotDataSet object.

x

a SlingshotDataSet object.

i

indices to be applied to rows (cells) of the reduced dimensional matrix and cluster labels.

j

indices to be applied to the columns (dimensions) of the reduced dimensional matrix.

Details

Warning: this will remove any existing lineages or curves from the SlingshotDataSet object.

Value

The accessor functions reducedDim, clusterLabels, lineages, adjacency, curves, and slingParams return the corresponding elements of a SlingshotDataSet. The functions pseudotime and curveWeights extract useful output elements of a SlingshotDataSet, provided that curves have already been fit with either slingshot or getCurves.

A matrix of cluster weights for each cell or a vector of cluster assignments.

Methods (by generic)

Slots

reducedDim

matrix. An n by p numeric matrix or data frame giving the coordinates of the cells in a reduced dimensionality space.

clusterLabels

matrix or character. An n by K matrix of weights indicating each cell's cluster assignment or a character vector of cluster assignments, which will be converted into a binary matrix.

lineages

list. A list with each element a character vector of cluster names representing a lineage as an ordered set of clusters.

adjacency

matrix. A binary matrix describing the adjacency between clusters induced by the minimum spanning tree.

curves

list. A list of principal_curve objects produced by getCurves.

slingParams

list. Additional parameters used by Slingshot. These may specify how the minimum spanning tree on clusters was constructed:

They may also specify how simultaneous principal curves were constructed:

Examples

rd <- matrix(data=rnorm(100), ncol=2)
cl <- sample(letters[seq_len(5)], 50, replace = TRUE)
sds <- newSlingshotDataSet(rd, cl)
clusterLabels(sds)

[Package slingshot version 1.2.0 Index]