newSlingshotDataSet: Initialize an object of class 'SlingshotDataSet'

Description Usage Arguments Value Functions Examples

Description

Constructs a SlingshotDataSet object. Additional helper methods for manipulating SlingshotDataSet objects are also described below.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
newSlingshotDataSet(reducedDim, clusterLabels, ...)

## S4 method for signature 'data.frame,ANY'
newSlingshotDataSet(reducedDim, clusterLabels, ...)

## S4 method for signature 'matrix,numeric'
newSlingshotDataSet(reducedDim, clusterLabels, ...)

## S4 method for signature 'matrix,factor'
newSlingshotDataSet(reducedDim, clusterLabels, ...)

## S4 method for signature 'matrix,ANY'
newSlingshotDataSet(reducedDim, clusterLabels, ...)

## S4 method for signature 'matrix,character'
newSlingshotDataSet(reducedDim, clusterLabels, ...)

## S4 method for signature 'matrix,matrix'
newSlingshotDataSet(
  reducedDim,
  clusterLabels,
  lineages = list(),
  adjacency = matrix(NA, 0, 0),
  curves = list(),
  slingParams = list()
)

Arguments

reducedDim

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

clusterLabels

character. A character vector of length n denoting each cell's cluster label.

...

additional components of a SlingshotDataSet to specify. This may include any of the following:

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 connectivity 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:

  • start.cluscharacter. The label of the root cluster.

  • end.cluscharacter. Vector of cluster labels indicating the terminal clusters.

  • start.givenlogical. A logical value indicating whether the initial state was pre-specified.

  • end.givenlogical. A vector of logical values indicating whether each terminal state was pre-specified

  • distmatrix. A numeric matrix of pairwise cluster distances.

They may also specify how simultaneous principal curves were constructed:

  • shrinklogical or numeric between 0 and 1. Determines whether and how much to shrink branching lineages toward their shared average curve.

  • extendcharacter. Specifies the method for handling root and leaf clusters of lineages when constructing the initial, piece-wise linear curve. Accepted values are 'y' (default), 'n', and 'pc1'. See getCurves for details.

  • reweightlogical. Indicates whether to allow cells shared between lineages to be reweighted during curve-fitting. If TRUE, cells shared between lineages will be iteratively reweighted based on the quantiles of their projection distances to each curve.

  • reassignlogical. Indicates whether to reassign cells to lineages at each iteration. If TRUE, cells will be added to a lineage when their projection distance to the curve is less than the median distance for all cells currently assigned to the lineage. Additionally, shared cells will be removed from a lineage if their projection distance to the curve is above the 90th percentile and their weight along the curve is less than 0.1.

  • shrink.methodcharacter. Denotes how to determine the amount of shrinkage for a branching lineage. Accepted values are the same as for kernel in the density function (default is "cosine"), as well as "tricube" and "density". See getCurves for details.

  • Other parameters specified by principal_curve.

Value

A SlingshotDataSet object with all specified values.

Functions

Examples

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

slingshot documentation built on Nov. 8, 2020, 5:51 p.m.